Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Jun 2005
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Preventing AutoOpen code from running (WordXP)

    I am running a VBA Word macro over a group of templates to list all their components. I was wondering if there is a way to prevent the AutoOpen code from running when I open each template?

    Thanks.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Preventing AutoOpen code from running (WordXP)

    The old WordBasic instruction DisableAutoMacros can be used to prevent automatic macros, including Document_Open, from running.

    WordBasic.DisableAutoMacros 1
    Set myDoc = Documents.Open("MyDocument.doc")
    WordBasic.DisableAutoMacros 0

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •