Microsoft
Software
Hardware
Network
Question : Word VBA how to find/delete pge breaks
I can insert page breaks in a Word document using VBA. I want now to find and delete a break. But I don't find any collection in the Object Model that contains such breaks. Is there a way to find (and delete) a page break?
Answer : Word VBA how to find/delete pge breaks
I think you used the following syntax to insert the page break
Selection.InsertBreak Type:=wdPageBreak
To find a page break using vba
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormat
ting
Selection.Find.Replacement
.ClearForm
atting
With Selection.Find
.Text = "^m"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute replace:=wdreplaceall
^m is a character is used to find a page break. I think this will help you
Rams
Random Solutions
SYSVOL Policies
Generic Host Process for Win32 Services Problem (not virus)
Microsoft, NTFS Permissions, Windows 2003 R2, PowerShell, recursive search for folder, not file, ACLs on 200,000 folders
javascript buton click
Javascript Reset function
Setting up Exchange Server 2003, Cisco Pix 501, DNS MX Record
Array formula to sum the product of two columns
Reverse HLOOKUP / find the first "0" from right to left in a row
Name of shapes/shape groups
how can i change stagewidth and stageheight with as3