P
Peter
Hi folks
I am writing a VB6 application that needs to access Word in order to open a file, create a table insert some fields and run a mail-merge (all through VB code). When setting a reference to the Word 10.0 object library it is easy to do all of this. However I am hoping to install the application on other users' computers which may have different versions of Word (and therefore different Word object libraries). I would therefore prefer to define my variables as Object and set them to the different Word objects without needing to set a reference to a specific Word object library, so that they can call on the existing Word Object library on the user's computer. Everything works fine EXCEPT a mail merge setting that relates to where the mail merge will be executed to
mailmerge.Destination=wbSendToPrinte
mailmerge.Destination=wbSendToDocumen
If I try to run the program without setting a reference to the Word Object library an error is generated that will not recognise the above 2 enums (wbSendToPrinter,wbSendToDocument)
Anyone know how to fix this?
I am writing a VB6 application that needs to access Word in order to open a file, create a table insert some fields and run a mail-merge (all through VB code). When setting a reference to the Word 10.0 object library it is easy to do all of this. However I am hoping to install the application on other users' computers which may have different versions of Word (and therefore different Word object libraries). I would therefore prefer to define my variables as Object and set them to the different Word objects without needing to set a reference to a specific Word object library, so that they can call on the existing Word Object library on the user's computer. Everything works fine EXCEPT a mail merge setting that relates to where the mail merge will be executed to
mailmerge.Destination=wbSendToPrinte
mailmerge.Destination=wbSendToDocumen
If I try to run the program without setting a reference to the Word Object library an error is generated that will not recognise the above 2 enums (wbSendToPrinter,wbSendToDocument)
Anyone know how to fix this?