Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts

    Operating paramters (Word all versions)

    (Edited by HansV to make URL clickable - see <!help=19>Help 19<!/help>)

    I just happened to see a referral here in the Word forum to a Microsoft KB regarding maximum parameter limitations for VBA.

    http://support.microsoft.com/kb/211489

    This article says that the maximum number of macros per template is 150, and the maximum number of global macros is 150. Is this really true? Does it mean the total number of macros in all global templates? I try to write atomic code, with the intention that the small bits of code will serve other purposes. Every Word environment that I've ever worked on has exceeded 150 global macros. I know word processes who have hundreds of (mostly recorded) macros that they store and trade among others in the department. I've never had nor heard of a problem due to "too many macros." Is this really an issue?

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

    Re: Operating paramters (Word all versions)

    I suspect that this limitation applied to a very old version of Word and that the VBA part of the article has never been updated since.

    I wrote some code to create a template with a module with 2,000 macros in Word 2002, and it works OK - all macros are visible in the list, and all work.

    There may well be a limit in recent versions of Word, but it is much higher than 150.

  3. #3
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts

    Re: Operating paramters (Word all versions)

    Thank you... that's reassuring. My first thought was to check what version of Word the article applied to, and it seems to be quite recent. My first VBA experience was with Word 97. I recall being told by a Word 6 developer how important it was to load global templates only as needed, and unload when no longer needed. This limitation might have been the reason; In any case, I didn't heed the advice.

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Operating paramters (Word all versions)

    When WordBasic-based templates were converted to Word 97-2000 VBA, each individual macro became a separate module with a single Main procedure. It could be that this limitation refers to that method of creating macros -- in other words, a limitation on the number of code modules. Just a guess.

  5. #5
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Operating paramters (Word all versions)

    Hi Richard,

    That web page says it applies to Word 2000 onwards. I doubt the accuracy of some of the information there, though. For example, In Word 2000 I have created a document with more than 35MB of text, compared to the published 32MB limit. The Word 2007-specific info is probably accurate, though - not that I'm going to try to create a document with 2,147,483,648 bookmarks or fields to test whether the limit really is 2,147,483,647 of either ...
    Cheers,

    Paul Edstein
    [MS MVP - Word]

Posting Permissions

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