Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Anyone know Word XP Syntax for Doc Close?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00737755
Message ID:
00737760
Views:
19
Do they get a syntax error, or just macro does not implement what it supposed to do?
Also did you try to record a macro in different versions and to compare the code?

>Hi Y'all,
>
>Customer is switching to Word XP (Word 2002) and a macro of theirs is failing. This worked under Word 97 but somehow the syntax is not right. I have dug and dug around the help files for Word 97/Word 2002 but they are not at all helpful ie. their example bombs. I have also dug around on the MSFT site until I was fed up as could not even get a match back to a more updated example. Here is the code in short:
>
>' add a new document and grab its name to use as a handle; this new doc is just a temp doc to paste stuff into which will later be dumped
>
>Documents.Add
>lcTempDoc = ActiveDocument.Name
>
>' do a bunch of cutting and pasting etc and then dump the temp doc
>
>Documents.Item(lcTempDoc).Close SaveChanges:=wdDoNotSaveChanges
>
>Albert
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform