This is my first Word VBA project in a long time.
My Access application sends data to Word for a Mail Merge. The resulting document is a thousand one-page sections. I want to find the section breaks and convert them to Page Breaks.
Can anybody help?? I have been reading the help but don’t seem to know what things are called.
Alan
![[smurf] [smurf] [smurf]](/data/assets/smilies/smurf.gif)
My Access application sends data to Word for a Mail Merge. The resulting document is a thousand one-page sections. I want to find the section breaks and convert them to Page Breaks.
Code:
Sub ConvertSec2Pages()
Dim I As Long
Dim Secs As Long
For I = 1 To ActiveDocument.Sections.Count
Secs = ActiveDocument.Sections(I).Range.End
Selection.GoTo what:=Secs [red]' <-- this does not work[/red]
Selection.TypeBackspace
Selection.InsertBreak Type:=wdPageBreak
Next
End Sub
Can anybody help?? I have been reading the help but don’t seem to know what things are called.
Alan
![[smurf] [smurf] [smurf]](/data/assets/smilies/smurf.gif)