Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003
    Thanked 0 Times in 0 Posts

    Optimising documents with macros in it.. (word 2000, word 97)

    Is there a way to optimise documents with macros in them?


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

    Re: Optimising documents with macros in it.. (word 2000, word 97)

    "Optimising" can have different meanings:
    - improving code quality/performance
    - minimising file size

    It is difficult to give hard and fast rules for optimising code quality/performance.
    - One of the tips repeated most often is that in most cases, it is more efficient to work with a Range object than with the Selection.
    - Another is to set Application.ScreenUpdating to False during the execution of a macro that manipulates the contents of a document. Make sure that it set to True again at the end, even if an error occurred!
    - Others will contribute more tips, I'm sure.

    About file size:
    After a while crud accumulates in your modules. Excel MVP Rob Bovey has created a code cleaner for Excel, and you can find an adaptation for Word here on the Word MVP site.

Posting Permissions

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