Wd2K7 - paragraphs.format not working ?

S

Sean McPoland

I have a document that is 1000+1 textboxes, and want to untextbox it...the
following macro works but does not duplicate the paragraph format as I think
it should...

advice much appreciated.

Sub unFrameWholeDocument()

Dim rngParagraph As Range
Dim tmpParagraph As Range
Dim cnlParagraph As Range
Dim pPar As Word.Paragraph
Set rngParagraph = Nothing

ActiveDocument.Bookmarks("\StartOfDoc").Select
SourceName = ActiveDocument.Name

Documents.Add Visible:=True
DestName = ActiveDocument.Name

Text = ""
paraI = 0

Documents(SourceName).Select

For Each pPar In ActiveDocument.Paragraphs

paraI = paraI + 1
Set rfrmtb = ActiveDocument.Paragraphs(paraI).Format.Duplicate
ttext = ActiveDocument.Paragraphs(paraI).Range

Documents(DestName).Select

ActiveDocument.Bookmarks("\EndOfDoc").Select
ActiveDocument.Paragraphs.Add
ActiveDocument.Paragraphs(paraI).Range = ttext
ActiveDocument.Paragraphs(paraI).Format = rfrmtb
'Selection.Paragraphs.Format = rfrmtb

Documents(SourceName).Select

Next pPar

End Sub

TIA
Sean
 

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