Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Instnce of Word97 No Longer Created
Message
From
21/12/2001 12:46:20
Stan Vaninger
Mitek Industries, Inc
Missouri, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Instnce of Word97 No Longer Created
Miscellaneous
Thread ID:
00597457
Message ID:
00597457
Views:
71
Early this year I added the ability to generate a Word97 document from one of my VFP6 apps using the excellent Hentzenwerke book by Tamar and Della. A command button on one of the forms calls a method which does:

thisform.oWord = CreateObject('Word.Application')
thisform.oDoc = thisform.oWord.Documents.Add()

The document is built and then saved to a code generated filename and finally made visible:

thisform.oWord.ActiveDocument.SaveAs(lcPathFileExt)
thisform.oWord.Visible = .T.

All was working well for 6 or 7 months. An instance of Word97 was begun and the new document appeared in the document window. Sometimes the instance of Word97 was on top, sometimes VFP stayed on top and the user had to click on the Word97 button on the task bar. But in either case, an instance of Word97 was created.

About 2 months ago, I migrated all of our VFP apps to VFP7 without any apparent problems. But now it seems that the above code no longer creates an instance of Word97 as it previously did. I have noticed that if the above code is executed and then the user starts Word97 from the desktop, the generated document is there but not on top (a new blank document is on top).

I suspect that the migration to VFP7 broke the above code somehow. Does anyone have any insight to this issue?

Thanks very much.

Stan
Next
Reply
Map
View

Click here to load this message in the networking platform