Joan Xiao was telling us:
Joan Xiao nous racontait que :
Thanks everyone for your post. The information you provided has been
definitely very helpful.
So is it possible to pass a parameter to Word somehow? My feeling is
that it isn't possible, espeically because in a web application, Word
is launched by a browser and I just don't see how any parameter can
be set.
An alternative for me is to dynamically create the macros. For
example, read a plain Word doc (with no macros), create a macro on
the fly and then insert it into the original doc. But then I need
know how macros are stored in a Word doc. Has anyone done something
like this? Where can I find any information related to this?
You can have a VB Script on a Web page that will create a Word document.
Also, I believe that VB Scripting can read info from the Web page.
So, it seems that you could read a field content, store it in a variable,
create/open the Word document, and, from within the VB Script run some code
passing it the variable you got prior to creating the Word object.
In pseudocode:
myVar = WebPageControlContent
WordDoc = Open Word Document
WordDoc.GoTo What:=wdGoToBookmark, Name:=myVar
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site:
http://www.word.mvps.org