Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Nov 2001
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    autoExec, autoOpen and autoClose being skipped (Word 2002)

    Hi,

    This is a tricky question, but any help is much appreciated.

    To ensure Word documents are opened within Word itself and not within IE when opened via a hyperlink, I changed the 'Browse In Same Window' option of the .Doc 'File Type' to false, thus forcing the document to be opened in a separate window.

    However, since doing this, the autoExec(), autoOpen() and autoClose() procedures of the Normal.dot file are being completely ignored. However, the autoExit() procedure is still executed upon exiting the new window.

    Does anybody know why?

    I really would appreciate any sort of response as it is critical and urgent that I am able to access the autoExec(), autoOpen() and autoClose() procedures.

    Many thanks,

    Chris

  2. #2
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: autoExec, autoOpen and autoClose being skipped (Word 2002)

    Hi Chris,

    One question would be whether you have Outlook open when you are trying to do this. Are your hyperlinks in web pages or in Word documents (.htm or .doc)? Are you using Word as your email editor?

    The AutoExec macro should only run once, when Word starts up (or if in a global, when that global is loaded if not at startup). It should not run just because you open another document, even if in a separate window, unless you are somehow forcing Word to load as a separate instance.
    Charles Kyle Kenyon
    Madison, Wisconsin

  3. #3
    2 Star Lounger
    Join Date
    Nov 2001
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: autoExec, autoOpen and autoClose being skipped (Word 2002)

    Hi Charles,

    Thanks for the reply. In answer to your question, I am not using Outlook at all. The hyperlinks I refer to are simple Not A Real Link hyperlinks contained within .htm pages. Pages a user will surf to on the intranet.

    Do you have any ideas why the autoOpen() and autoClose() functions are being ignored when the Word documents are being opened this way (note the file type setting I mentioned in the first post)?

    Thanks <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    Chris

  4. #4
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: autoExec, autoOpen and autoClose being skipped (Word 2002)

    Chris,

    Can't offer any answers but just a guess that the problem is related to the fact that the documents are being opened via a hyperlink in IE rather than being opened directly in Word - possibly the usual Document Open and Close events aren't triggered when documents are opened this way (whether within the browser or in a new Word window).

    A couple of things to try would be to use Document_New and Document_Close event procedures (in the ThisDocument module) rather than AutoOpen and AutoClose. There are also application-level Document Open and Close events that you could look into - these have broader scope than the document-level Open and Close events (but don't know if they will help here...).

    Gary

Posting Permissions

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