Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / June 2005

Tip: Looking for answers? Try searching our database.

How to: delete sections pagebreak?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
papou - 23 Jun 2005 09:59 GMT
Hi all
I am trying to automate deletion of sections pagebreaks in a Word document.
I have tried this:
With ActiveDocument
.Sections
For i = 1 To .Count
.Item(i).Range.Delete
Next i
End With

but to no avail since this will delete the entire pages of my merged
document where I only want to delete the pagebreaks.

TIA
Cordially
Pascal
Doug Robbins - 23 Jun 2005 10:08 GMT
Use Edit>Replace.  But probably not Replace All.  Be mindful of what it may
do the headers and footers.

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> Hi all
> I am trying to automate deletion of sections pagebreaks in a Word
[quoted text clipped - 13 lines]
> Cordially
> Pascal
papou - 23 Jun 2005 11:59 GMT
Hello Doug
Thank you for your answer.
I have tried this method but it seems that the first section pagebreak won't
delete.
Any solution?

Here's my code:
Selection.WholeStory
With Selection.Find
.Text = "^b"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Execute Replace:=wdReplaceAll
End With

TIA
Cordially
Pascal
> Use Edit>Replace.  But probably not Replace All.  Be mindful of what it may
> do the headers and footers.
[quoted text clipped - 16 lines]
> > Cordially
> > Pascal

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.