Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / June 2005

Tip: Looking for answers? Try searching our database.

Sending Word a paramerter from VBScript

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
hals_left - 09 Jun 2005 11:11 GMT
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
Jay Freedman - 09 Jun 2005 15:01 GMT
> Hi - Is there anyway to do this ?
> I am using:
[quoted text clipped - 9 lines]
> 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).

Signature

Regards,
Jay Freedman
Microsoft Word MVP          FAQ: http://word.mvps.org

Cindy M  -WordMVP- - 11 Jun 2005 16:44 GMT
Hi Hals_left,

> I am using:
> <script language="Vbscript">
[quoted text clipped - 5 lines]
> 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 :-)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.