Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't Add new document in Word.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Can't Add new document in Word.
Divers
Thread ID:
00532159
Message ID:
00532159
Vues:
57
OK, This one is really weard.
I can create a word application, and make it visible, but I can't always get it to add or open a document. Sometimes it works OK. Sometimes I get the error that says my command is not found "OLE Error Code 0x8002003: Member not found". And I know that the ADD is a member of the documents collection.
When I have done the oWord.CreateObject("word.application"), and made it visible with oWord.visible = .t. I can see Word on my task bar, and go to it, open a doc and everyting in Word works OK. Except when I toggle back to VFP6, I get the errors when I try to add or open an existing doc.

Any ideas would be greatly appreciated... See p.p.s below.

p.s. what I am doing is creating a word document to handle any information for my record that doesn't fit into the neat table categories I have predisposed. So I have a control button on the form that opens word, adds a document or opens an existing one if it already is there, and makes word visible. If it adds one, it saves it with a filename that is the data table primary key.

p.p.s It works sometimes!!! Users have clicked on the button and created and saved documents corrrectly.

p.p.p.s Some users are running Word 97, some Word 2000. So far no correlation.

p.p.p.s I have been using Granor and Martin (Hentzenwerk) book for reference and Wiki-AutomationExamples
Ron Seidl
Independent Developer
VFP

"I'm playing in life's theater in anticipation of a great cast party!"
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform