F
f.tecnig
Hi,
I would like to know if it's possible to easily create a new range following
a previously created range
What I want is to select a table which is located after a bookmark
Sub TestTbl()
Dim doc As Document
Dim rng1 As Range
Dim rng2 As Range
Set doc = activeDocument
Set rng1 = doc.Bookmarks("TableF").Range
'Error
'Set rng2 = doc.Range(Start:=rng1.End, End:=0)
Set rng2 = doc.Range(Start:=1, End:=2)
rng2.MoveEnd Unit:=wdTable
rng2.Font.Color = wdColorRed
End Sub
Maybe copying rng1 to rng2 and then modifying rng2 is a better option if I
want a new range
I would like to know if it's possible to easily create a new range following
a previously created range
What I want is to select a table which is located after a bookmark
Sub TestTbl()
Dim doc As Document
Dim rng1 As Range
Dim rng2 As Range
Set doc = activeDocument
Set rng1 = doc.Bookmarks("TableF").Range
'Error
'Set rng2 = doc.Range(Start:=rng1.End, End:=0)
Set rng2 = doc.Range(Start:=1, End:=2)
rng2.MoveEnd Unit:=wdTable
rng2.Font.Color = wdColorRed
End Sub
Maybe copying rng1 to rng2 and then modifying rng2 is a better option if I
want a new range