Insert a "blank" paragraph (mark) before every paragrahp of adocument

A

andreas

Dear Experts:

I got a Word 2003 document in which I should add a "blank" paragraph
before each paragraph. My source document does not have any blank
paragraphs whatsoever.

I know that I can create extra spacing between paragraphs by changing
the paragraph property (space before / after) but this does not apply
in my case, since I need to fill in that "blank" paragraph
afterwards.

Help is much appreciated. Thank you very much in advance.

Regards, Andreas
 
C

Cindy M.

Hi Andreas,
I got a Word 2003 document in which I should add a "blank" paragraph
before each paragraph. My source document does not have any blank
paragraphs whatsoever.

This appears to work:

Dim para As Word.Paragraph
Dim doc As Word.Document

Set doc = ActiveDocument
For Each para In doc.Paragraphs
para.Range.InsertBefore vbCr
Next

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 
A

andreas

Hi Andreas,


This appears to work:

    Dim para As Word.Paragraph
    Dim doc As Word.Document

    Set doc = ActiveDocument
    For Each para In doc.Paragraphs
        para.Range.InsertBefore vbCr
    Next

Cindy Meister
INTER-Solutions, Switzerlandhttp://homepage.swissonline.ch/cindymeister(last update Jun 17 2005)http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)

Hi Cindy,

great help as always. Thank you very much. Have a nice Sunday.
Regards, Andreas
 
M

macropod

Hi andreas,

You don't need vba for this - a Find/Replace will do.
For the 'Find' string use:
*^13
For the 'Replace' string use:
^p^&
and check the 'use wildcards' option.
 
A

andreas

Hi andreas,

You don't need vba for this - a Find/Replace will do.
For the 'Find' string use:
*^13
For the 'Replace' string use:
^p^&
and check the 'use wildcards' option.

--
Cheers
macropod
[Microsoft MVP - Word]



andreas said:
Dear Experts:
I got a Word 2003 document in which I should add a "blank" paragraph
before each paragraph. My source document does not have any blank
paragraphs whatsoever.
I know that I can create extra spacing between paragraphs by changing
the paragraph property (space before / after) but this does not apply
in my case, since I need to fill in that "blank" paragraph
afterwards.
Help is much appreciated. Thank you very much in advance.
Regards, Andreas- Zitierten Text ausblenden -

- Zitierten Text anzeigen -

Hi macropod,

great tip. Thank you very much. Regards, Andreas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top