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?
Thanks a lot.
Joan
Joan Xiao was telling us:
Joan Xiao nous racontait que :
> Thanks everyone for your post. The information you provided has been
> definitely very helpful.
[quoted text clipped - 9 lines]
> 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

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
Joan Xiao - 15 Sep 2005 18:12 GMT
Thanks Jean for the reply. The problem is that my web application is Java
(J2EE) based, so I don't think it can execute any code in VBA.
Does anyone know how Word stores a macro in a doc? I'm really thinking af
programmatically creating the macros and insert them into Word docs.
Thanks.
Joan