D
Dominique Feteau
I have a program that is supposed to look for some text, move to the next
line and then insert a continuous page break. Problem is I can't get it to
move to the next line. The line I'm using "MoveDown Unit:=wdLine" gives me
an error. Any suggestions??
Dominique
Sub Macro2()
With ActiveDocument.Content.Find
.Text = "END OF REPORT"
Do While .Execute(Forward:=True) = True
With .Parent
If .End = ActiveDocument.Content.End Then
.MoveDown Unit:=wdLine
.InsertBreak Type:=wdSectionBreakContinuous
Exit Do
Else
.MoveDown Unit:=wdLine
.InsertBreak Type:=wdSectionBreakContinuous
.Move Unit:=wdParagraph, Count:=1
End If
End With
Loop
End With
End Sub
--- news://freenews.netfront.net/ - complaints: (e-mail address removed) ---
line and then insert a continuous page break. Problem is I can't get it to
move to the next line. The line I'm using "MoveDown Unit:=wdLine" gives me
an error. Any suggestions??
Dominique
Sub Macro2()
With ActiveDocument.Content.Find
.Text = "END OF REPORT"
Do While .Execute(Forward:=True) = True
With .Parent
If .End = ActiveDocument.Content.End Then
.MoveDown Unit:=wdLine
.InsertBreak Type:=wdSectionBreakContinuous
Exit Do
Else
.MoveDown Unit:=wdLine
.InsertBreak Type:=wdSectionBreakContinuous
.Move Unit:=wdParagraph, Count:=1
End If
End With
Loop
End With
End Sub
--- news://freenews.netfront.net/ - complaints: (e-mail address removed) ---