Sending Word a paramerter from VBScript

H

hals_left

Hi - Is there anyway to do this ?
I am using:
<script language="Vbscript">
Set objWord = CreateObject("Word.Application­")
Set objDocument = objWord.Documents.Add ("myTemplate.doc")
</script>

I need to pass in to the call or read from word vba a parameter
availble in the web page or session or users cookies so that i can use
this in vba code in the document.

Thanks
hals_left
 
J

Jay Freedman

hals_left said:
Hi - Is there anyway to do this ?
I am using:
<script language="Vbscript">
Set objWord = CreateObject("Word.Application­")
Set objDocument = objWord.Documents.Add ("myTemplate.doc")
</script>

I need to pass in to the call or read from word vba a parameter
availble in the web page or session or users cookies so that i can use
this in vba code in the document.

Thanks
hals_left

There isn't any direct way to pass a parameter. If the VBscript can write a
text file or a registry entry in a known location, then the macro can read
that location (and, if necessary, delete the file or entry).
 
C

Cindy M -WordMVP-

Hi Hals_left,
I am using:
<script language="Vbscript">
Set objWord = CreateObject("Word.Application­")
Set objDocument = objWord.Documents.Add ("myTemplate.doc")
</script>

I need to pass in to the call or read from word vba a parameter
availble in the web page or session or users cookies so that i can use
this in vba code in the document.
You'd have to use objWord.Run (=Application.Run) to run a macro already
in the document. As long as this is Word 2000 or later, that method
accepts parameters.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top