J
justagrunt
Hello,
How can I insert a new page break after the last full stop, period in a
pasted text but before the next bookmark. The bookmarks are in white font on
the page, (numbered 1 thru 11 and identified as bookmarks as section1 thru
section11).
I have tried - rem'ed out because it must have inserted after the last
bookmark, so the next page could not be pasted as the bookmarks wern't there,
I guess.
'open the letter
Set destdoc9 = Wordapp.Documents.Open(strInputFileName) 'letter
With destdoc9
..Bookmarks("section9").Range.FormattedText = srcDoc.Range.FormattedText
Rem .Range.InsertBreak Type:=wdPageBreak
..close (wdSaveChanges)
End With
'close the Attachment sheet
srcDoc.close (wdDoNotSaveChanges)
Else
'do nothing
End If
How can I insert a new page break after the last full stop, period in a
pasted text but before the next bookmark. The bookmarks are in white font on
the page, (numbered 1 thru 11 and identified as bookmarks as section1 thru
section11).
I have tried - rem'ed out because it must have inserted after the last
bookmark, so the next page could not be pasted as the bookmarks wern't there,
I guess.
'open the letter
Set destdoc9 = Wordapp.Documents.Open(strInputFileName) 'letter
With destdoc9
..Bookmarks("section9").Range.FormattedText = srcDoc.Range.FormattedText
Rem .Range.InsertBreak Type:=wdPageBreak
..close (wdSaveChanges)
End With
'close the Attachment sheet
srcDoc.close (wdDoNotSaveChanges)
Else
'do nothing
End If