We are using a commercial requirements managment app which includes the
ability to import and export word documents. During an export, this app
automatically inserts code into the document AutoOpen.MAIN sub. I want to
prevent the exported word docs AutoOpen.MAIN sub from executing and instead
execute my own custom code on startup.
Is their a method to prempt the document AutoOpen.MAIN sub (and disable it?)
programmatically? I copied my custom code into the global template
AutoOpen.MAIN hoping it would take precedence over the document
AutoOpen.MAIN, but that didn't work. Is it possible to somehow only disable
the document AutoOpen.MAIN entirely (ActiveX, registry) ? I asked the vendor
of the app but they weren't too helpful. Any suggestions will be extremely
appreciated.
Charles Kenyon - 09 Feb 2005 21:55 GMT
A macro in a document having the same name will intercept any in a global.
You can set your macrosecurity to medium and disable macros in the document
as it is opened.

Signature
Charles Kenyon
Word New User FAQ & Web Directory: http://addbalance.com/word
Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide
See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
> We are using a commercial requirements managment app which includes the
> ability to import and export word documents. During an export, this app
[quoted text clipped - 14 lines]
> extremely
> appreciated.
johnny p - 09 Feb 2005 22:21 GMT
Maybe my previous message wasn't clear enough. This word document has other
macros which are used (hence disabling all macros isn't an option). I merely
want to disable and override the behavior of the document AutoOpen.MAIN, not
all macros.
> A macro in a document having the same name will intercept any in a global.
>
[quoted text clipped - 18 lines]
> > extremely
> > appreciated.
Jay Freedman - 10 Feb 2005 02:00 GMT
>We are using a commercial requirements managment app which includes the
>ability to import and export word documents. During an export, this app
[quoted text clipped - 9 lines]
>of the app but they weren't too helpful. Any suggestions will be extremely
>appreciated.
Hi Johnny,
See http://word.mvps.org/FAQs/MacrosVBA/WordBasicCommands.htm, the
part about the DisableAutoMacros command.
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org