D
David Cuthill
I am using the following code to locate and place a bookmark - the
problem is after the code executes I also end up with a bookmark with
a name like _1123334 that happens to be at the same range location.
Any idea why this is taking place?
Set oWordDoc = ActiveDocument
TabCnt = oWordDoc.Tables.Count
For i = 1 To TabCnt Step 4
z = CStr(i)
Set Rng = ActiveDocument.Tables(i).Range
Rng.Copy
Rng.Collapse wdCollapseEnd
Rng.InsertAfter "" & vbCrLf
Rng.Collapse wdCollapseEnd
ActiveDocument.Bookmarks.Add Name:="BarChart" & z, Range:=Rng
...
...
Next i
Thanks for any help.
problem is after the code executes I also end up with a bookmark with
a name like _1123334 that happens to be at the same range location.
Any idea why this is taking place?
Set oWordDoc = ActiveDocument
TabCnt = oWordDoc.Tables.Count
For i = 1 To TabCnt Step 4
z = CStr(i)
Set Rng = ActiveDocument.Tables(i).Range
Rng.Copy
Rng.Collapse wdCollapseEnd
Rng.InsertAfter "" & vbCrLf
Rng.Collapse wdCollapseEnd
ActiveDocument.Bookmarks.Add Name:="BarChart" & z, Range:=Rng
...
...
Next i
Thanks for any help.