Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VF55.0, Word97 and VBA
Message
From
24/08/1999 04:07:10
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
VF55.0, Word97 and VBA
Miscellaneous
Thread ID:
00256946
Message ID:
00256946
Views:
37
Hi,

With Word v6 and Basic, the macro recorder allows for the creation of a macro to perform operations on macros, like deleting a macro etc.
This makes it possible to automate updating of a VFP program that relies upon Word macros for particular functions.

This seems not to be possible in Word97 with VBA. Does anybody know how or if it is possible to perform similar operations in Word97/VBA?

When making repeated calls from VFP to Word97, creating a new doc file at each call, for some reason a file named OFFITMES.LOG in the Windows directory grows with each call. Snooping the file shows that it contains the names of the documets created etc. When it becomes too large, opening or closing of Word becomes very slow.

I can fix this by deleting the log file, but would prefer that the file didn't bevave in this manner at all.


Here is the code I use:

oWord = CREATEOBJECT("Word.Application")
oWord.Run("Mymacro")
* mymacro creates a file by MailMerge, then save and close.
oEdit = CREATEOBJECT(("Word.Basic")
oEdit.Fileopen(filename)
oEdit.AppMaximize

I have found it necessary to create the second object in order to be able to edit the file created by the macro, as I haven't been able to get Word up and visble on the screen by opening the file with oWord.

Hope for some help with this

Rolf
Reply
Map
View

Click here to load this message in the networking platform