Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Sending ASP Session Variable to Word Macro

Reply
Thread Tools

Sending ASP Session Variable to Word Macro

 
 
Colin Steadman
Guest
Posts: n/a
 
      01-19-2004
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=vbscript>
Dim objWord

Sub button_onclick()
Call OpenDoc("http://server.domain.net/website/wordtemplate.dot")
End Sub

Sub OpenDoc(strLocation)
Set objWord = CreateObject("Word.Application")
objWord.Visible = true
objWord.Documents.Open strLocation
End Sub
</script>
</head>

<body>

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

</body>
</html>
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Generates integer literal of the largest value a variable can hold.Macro takes only variable-name. John Reye C Programming 14 05-08-2012 04:40 AM
System Session Variable VS. Own-declared 'Session' Variable chowchho ASP .Net 7 03-28-2008 02:38 PM
Sending Variable content, not Variable name Ian Hubling Javascript 2 04-29-2004 12:26 AM
Session State - What does it take to establish one single ASP.NET session per "browser session" Jeff Smythe ASP .Net 3 01-02-2004 04:10 AM
Sending a session variable to a custom control Scott ASP .Net Building Controls 2 12-12-2003 09:03 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57