J
John
Hello,
I am new to VBA with Word. Can someone tell me how I would select a certain
range on a specific page. For example, I am using the following to select a
range (from character 81 to the next tabstop). This seems to work fine but
only on the 1st page of my document. How can I select this range on another
page, for example page 20?
Any help would be greatly appreciated! Thanks!
Set myRng = ActiveDocument.Range(Start:=81, End:=82)
myRng.Select
Do Until myRng = oChar
If myRng <> oChar Then
Pos = Pos + 1
Set myRng = ActiveDocument.Range(Start:=Pos, End:=Pos + 1)
myRng.Select
End If
Loop
Set myRng = ActiveDocument.Range(Start:=81, End:=Pos)
I am new to VBA with Word. Can someone tell me how I would select a certain
range on a specific page. For example, I am using the following to select a
range (from character 81 to the next tabstop). This seems to work fine but
only on the 1st page of my document. How can I select this range on another
page, for example page 20?
Any help would be greatly appreciated! Thanks!
Set myRng = ActiveDocument.Range(Start:=81, End:=82)
myRng.Select
Do Until myRng = oChar
If myRng <> oChar Then
Pos = Pos + 1
Set myRng = ActiveDocument.Range(Start:=Pos, End:=Pos + 1)
myRng.Select
End If
Loop
Set myRng = ActiveDocument.Range(Start:=81, End:=Pos)