Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Dec 2003
    Location
    Ledgewood, New Jersey, USA
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Word Macro (Office 2003)

    <P ID="edit" class=small>(Edited by jscher2000 on 19-Dec-03 12:27. VERY long code excerpts make threads hard to follow. Attachments work better in such cases.)</P>Thanks for the latest WOW, Woody. I use a similar macro to the one you showed for squeezing out extra spaces to generally compress documents (since my normal styles, and most of the others I use, include spaces after each paragraph. It eliminates both extra spaces and extra paragraph marks. The macro is:

    3-page long macro moved to the attachment -Jefferson

    I've been using it since Office 95 and it saves lots of work with imported text.

    Chuck
    Attached Files Attached Files

  2. #2
    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: Word Macro (Office 2003)

    Chuck, with a few loops and some testing, you can write a more generalized macro that will work for any number of spaces or any number of paragraph marks. Word is going to have to work a bit harder doing it in little bits than when using your macro, so if performance is an issue, replaces that target longer stretches of spaces and paragraph marks might be preferred.

    I'm attaching the revised version. What do you think?

    There is one very significant issue presented by my version, which is that it only operates on the document body as a whole, and would not be appropriate for use only on a selection of the document. That would require quite different code.
    Attached Files Attached Files

  3. #3
    New Lounger
    Join Date
    Dec 2003
    Location
    Ledgewood, New Jersey, USA
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word Macro (Office 2003)

    Thank you for the suggestion. Even though performance is not an issue, I like the tighter code and I'll test and implement it within the next few days. (I created the first one with the record macro facility rather than writing the code.)

    Chuck

Posting Permissions

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