Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Jun 2004
    Location
    New York, New York, USA
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Compile command in Word VBA 2003? (VBA/Word/2003)

    Does anyone know why the compile command (Debug | Compile) in the Word VBA 2003 IDE is always enabled?

    In the past (with Word 97, 2000, etc.), once I compiled a Word VBA template and saved it, the next time I opened it in the IDE, the compile command would be disabled (indicating the code was already compiled, and didn't need compiling again). Now, with 2003, every time I open a template in the IDE, the compile command would always be enabled, no matter if the template's code was already previously compiled or not.

    Is this a bug in Word VBA 2003?

    Thanks.

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Compile command in Word VBA 2003? (VBA/Word/2003)

    Are you saving the template after the compile?

    I don't see that behavior.

  3. #3
    New Lounger
    Join Date
    Jun 2004
    Location
    New York, New York, USA
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Compile command in Word VBA 2003? (VBA/Word/2003)

    Yes, I am saving the templates each time.

    Well, I forgot to mention in my original post that this behavoir only happens with Word VBA template files which have a reference to other Word template files. If the template doesn't have a reference to another template file, once it's compiled, the next time it's opened, the Compile command is disabled, as it should be. However, templates which have references to other templates always seem to "forget" that they've been compiled when they're opened again.

  4. #4
    Star Lounger
    Join Date
    Jun 2004
    Location
    Gtr London, England
    Posts
    90
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Compile command in Word VBA 2003? (VBA/Word/2003)

    It's not much help to you but I have generic code, which is referenced by a number of other templates and I don't have this problem when I open the other templates (I am working in Office 2003). If they were compiled and saved previously the "Compile" button is disabled.

    Not much use to you, but thought I would mention.
    Jack

  5. #5
    New Lounger
    Join Date
    Jun 2004
    Location
    New York, New York, USA
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Compile command in Word VBA 2003? (VBA/Word/2003)

    Jack,

    Actually, your reply was very helpful, and I think I realize what was causing this behavoir in my case now.

    I also have a "generic" code template, which is referenced by a number of other templates. This master "generic" template I would compile and save first before re-compiling the other templates which reference it.

    However, in my case, my master "generic" template itself also references a third-party (Hummingbird, who makes DocsOpen) Word template, which I never re-compiled in the Word 2003 VBA IDE. I bet that once I go through the process of re-compiling and saving that Hummingbird template, then my master "generic" template and all its dependent templates again, the Compile command will be disabled for all these templates, as it should be.

    Thanks again for your input.

    Stephan

Posting Permissions

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