General information
Category:
Coding, syntax & commands
We get a basic "command failed" error. Finally tracked down the problem (somewhat). It happens on PC's that also have a Lotus Notes product installed on them as well (a product called "Desktop Enabler"). Once this is installed, the macro line that closes the document bombs - the document is closed though, it it just that the macro fails to run after this point. I suspect that this "Desktop Enabler" is firing some other code that is failing - it is hooked into Word through an Add-in template.
I think I am just going to have to rewrite the macro to not use a temp document (if I can). I don't have the tools to know what else is firing and where the code is to track this down further. I think that this "add-in" somehow inserts code into Word events that then call some custom dll's that are part of the Enabler's product.
Thanks for the help anyhow.
Albert
>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
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only