Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Mar 2008
    New York, New York, USA
    Thanked 0 Times in 0 Posts

    Word crashing with Document_Open (2007)

    Word crashes for some of my users when they try to open a file containing a Document_Open routine. The routine works fine for most users, but a handful cannot run the macro without Word shutting down.

    After some declarations, the only command that it runs before a message box should appear is:
    thisSys = System.OperatingSystem
    The message box never appears, so I assume it crashes before it gets there.

    Does anyone know of a setting that might be preventing these users from running the Document_Open routine? I've looked all over Word Options, and can't seem to find anything.


  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Word crashing with Document_Open (2007)

    If possible, go to one of the users who has problems and try the following:
    - Start Word.
    - If the user is prompted to allow macros, open the document and hold down the Shift key while clicking "Enable Macros", until the document has fully opened.
    - If the user doesn't get this prompt, hold down the Shift while opening the document until it has fully opened.
    - This will prevent automatic execution of Document_Open.
    - Activate the Visual Basic Editor (Alt+F11).
    - Select Debug | Compile <projectname> to see if there are problems with the code.
    - Open the ThisDocument module.
    - Click in the Document_Open procedure.
    - Try to execute it step-by-step by pressing F11.

Posting Permissions

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