473,756 Members | 2,378 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sending ASP Session Variable to Word Macro

Apoligies if this post appears twice, but my first attempt at posting
it was hours ago and there is still no sign of it in the forum (says
five minutes in the confirmation message).

=============== =============== =============== =============== =============== ==

I have some sample code from Microsoft that allows me to start a
specific Word template at the click of a button from within an ASP
page. I would like to modify this in such a way that I can pass an
ASP Session variable to a macro inside the template. Is this actually
possible?

The ASP page (copied below) opens the template, and the AutoOpen macro
is fired displaying a simple msgbox. All I need now is to pass the
macro a Session variable and I'm done, but I'm having great difficulty
finding the correct method to achieve this.

If this isn't possible could someone please put me out of my misery!

TIA,

Colin

<html>
<head>
<title>Start Word Template Test</title>
<script language=vbscri pt>
Dim objWord

Sub button_onclick( )
Call OpenDoc("http://server.domain.n et/website/wordtemplate.do t")
End Sub

Sub OpenDoc(strLoca tion)
Set objWord = CreateObject("W ord.Application ")
objWord.Visible = true
objWord.Documen ts.Open strLocation
End Sub
</script>
</head>

<body>

<input type=button name=button value="Create Letter">

</body>
</html>
Jul 19 '05 #1
0 1380

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3540
by: PM | last post by:
I'm trying to make a kind of search history containing the 3 last searched words. So I'm using 3 Session Variables: Word1 / Word2 / Word3. In order to get this history working, I need to put the last searched word in the following Variable. Ex.: Session("Word3") = Session("Word2") Session("Word2") = Session("Word1")
0
1398
by: Nick Jushchyshyn | last post by:
Having a really strange issue with IIS 6 where the session variable does not stay consistant. The first symptom was that database connections (which use a user entered name/PW stored in the Session) in ASP pages were failing. Finally got to (what I think is) the root issue by creating two ASP pages, one that sets Session("test") = "Hello", and the other simply displays "Test word: .." and the content of Session("test"). After visiting the...
2
3144
by: Jeff User | last post by:
Greetings I am writing code in a C# web service solution. I want to create an instance of an object (that I created) in a Session variable. I need to check to see if the Session variable has been set yet. If the variable already contains an instance of this object then I will retrieve and use the existing object, rather than create a new instance. ie. I will only create a new object the first time the procedure is called, and then save...
9
2385
by: Greg Linwood | last post by:
I'm having difficulty understanding Session state in ASP.Net. It's almost embarrassing asking this as I've been using ASP since it was first released & it really shouldn't be this hard to use - perhaps I'm just not very smart or perhaps MS is making this too hard for us sql bunnies to understand - I dunno, but I'd really appreciate someone explaining what I'm doing wrong here & perhaps suggest a better approach.. I'm familiar with use of...
5
3028
by: Vishal | last post by:
Hello, I already asked this question in the ASP.NET forums, but no help came. So I am hoping that somebody can help me out. This is really very URGENT me. For my e-commerce application, I need to send data from my server via the post method to the payment server. The payment server does not run asp.net. I dont know what they run. The payment server then returns to my server with the
14
2194
by: Coleen | last post by:
Hi All :-) We have an APSX application using VB.net as the code behind, which uses one or two session variables per page. These Session variables are passed to the final page and calculations and summaries are done there. In order for all of the values to appear on the last page, the user has to view each page that has a session variable to be passed to the last page. The only way I can think of to bypass the necessity of the user...
17
1588
by: Jan Kucera | last post by:
Hi. How can I join session or read Session variables if I have the SessionID (or anything what I can supply)? Imagine I have a external link from my webpages, which opens an application which is expected to make requests to the server. It starts another session, but I need to use the session from browser. To the link I'm able to send any property the server can give me. Thanks, Jan.
2
1462
by: DLN | last post by:
Hello all, I apologize for the naivety of this question, but I'm wondering whether session variables can ever be modified (somehow) by a client without having to go through code that I write. If I read in user input from a web form, sanitize the input to make sure there isn't any injected data, and then store the sanitized input in a session variable, is there any way for that session variable to be modified by the client afterwards? I...
0
1780
by: damimkader | last post by:
Hi, I'm trying to send emails using a Macro based on an Excel Sheet and the Email Client I'm using is Lotus Notes. OS used - Windows Xp. Language - VB Below is the Code I'm using for doing the same. Dim Maildb As Object
0
9431
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9255
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9689
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8688
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6514
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5119
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5289
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3326
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2647
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.