Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can i pass a vb6 object to word97?

Status
Not open for further replies.

Motts

Programmer
Aug 19, 1999
6
US
I'm using VB6 to automate Word97 without problems, but when I try to establish communication from that Word object back to my VB6 app, GetObject fails. I have used CreateObject(VB6app.class) even when the VB6app is running without a second instance of the VB6app starting. Is this normal?<br>
<br>
A better solution for me would be to pass a reference to VB6app.class to Word when I start Word from VB6app. Is that possible?
 
Hi Motts,<br>
<br>
What exactly are you trying to do? I would have thought that it is not a great idea to pass control of your app to word97 (is that what your trying to do?). Can you not instanciate you class from within the VB app and let VB control both the instance of word and the instance of the class, doing what ever you want from the VB app.<br>
<br>
C
 
Thanks for your response.<br>
<br>
I guess I need to provide more details of what I am trying to do with Word97. I need word to communicate back to my VB6app that a certain macro/command has run/been requested.<br>
For example, the user selects "Insert Boilerplate" (a custom command) in Word97. My VB6app responds to that by displaying a boilerplate picker form with hundreds of boilerplate clauses that merges preset text with data from the current VB6app's case file record data. Upon the user selecting the boilerplate and filling in or modifying the input fields, the VB6app inserts this text (in varying colors, whether it's boilerplate or case file data, for easier proofing) into Word97, and then returns control back to Word97. I am currently doing this in VB3/Word6.0, but with the help of a 3rd party API wrapper DLL from Desaware called SpyWorks, but I should have to resort to that in this 'integrated MS Office..."<br>
<br>
Does this clarify my dilemma?
 
Oops, the post above was a response to calahans. Apparently I was not logged in when I posted my repsonse.<br>
<br>
Sorry about that.<br>
-Motts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top