Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    London, Gtr London, England
    Posts
    416
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Paragraph Formatting (All)

    Hi

    I have a document (actually quite a few 100 docs) that need some paragraph formatting changes. The styles affected are Heading 1, Heading 2 & Heading 3.

    Now the users have made changes to the paragraph formatting. For example, for some H2 styled paragraphs they changed things like 'Page break before', 'Keep with next', Left Indent and so on. What I would like to be able to do quite easily is for selected styled paragraphs just change the Left Indent, Firstline/Hanging indent, before and after spacing but not change the 'keep with next', 'page break before' that they have set up. I thought I would be able to do this by displaying the 'styles and formatting pane', select H2 left paragraph and set required options but it doesn't seem to work for all paragraphs. It does some but not all. I thought it would do it for all [img]/forums/images/smilies/sad.gif[/img]. Also, since there are lots of docs to do - can this be done in a macro?

    Thanks.

    Robie
    Thanks.
    Robie

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

    Re: Paragraph Formatting (All)

    See attached text file. The macro ProcessCurDoc will modify the Heading 1, 2 and 3 paragraphs in the current document. The macro ProcessFolder will do this for all Word documents in a folder (specified in the constant strFolder. Both use the same procedure ProcessDoc.
    Test carefully using ProcessCurDoc before trying it out on a complete folder.
    Attached Files Attached Files

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

    Re: Paragraph Formatting (All)

    I forgot - if you're going to use the version that loops though the documents in a folder, you'll want to insert a line

    Application.ScreenUpdating = False

    at the beginning, to speed up code execution.

  4. #4
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    London, Gtr London, England
    Posts
    416
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Paragraph Formatting (All)

    Thank you. Thank you. Thank you.

    What can I say. You have saved me lot of grief. Very grateful Hans.
    Thanks.
    Robie

Posting Permissions

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