D
Debra Farnham
Hi All:
Windows 2k
Word 2K
I have written a piece of code that picks up the name of a bookmark, goes to
Table1 in my document, adds a new row and inserts the bookmark text and page
number. I now need the insertion point to return to the location in the
document that it was prior to entering the bookmark info into Table 1.
Code snippet:
oTable.Range.Rows(oTable.Rows.Count).Range.Select
Selection.InsertRowsBelow 1
Selection.Collapse (wdCollapseStart)
myrow = Selection.Information(wdStartOfRangeRowNumber)
If strHeaderText = " in-Ch." Then
With Selection
.TypeText Text:=StrConv(Trim(strFWitnessName),
vbProperCase)
.MoveLeft unit:=wdWord, Count:=3, Extend:=wdExtend
.Font.UnderLine = wdUnderlineNone
.MoveRight unit:=wdCell
Selection.InsertCrossReference
ReferenceType:="Bookmark", ReferenceKind:= _
wdPageNumber, ReferenceItem:=strBN,
InsertAsHyperlink:=True, _
IncludePosition:=False
End With
End If
AT THIS POINT I NEED TO RETURN THE INSERTION POINT TO ITS LOCATION PRIOR TO
EXECUTING ABOVE CODE. I'm quite certain I could use yet another bookmark
but is there another way?
TIA for any help!
Debra
Windows 2k
Word 2K
I have written a piece of code that picks up the name of a bookmark, goes to
Table1 in my document, adds a new row and inserts the bookmark text and page
number. I now need the insertion point to return to the location in the
document that it was prior to entering the bookmark info into Table 1.
Code snippet:
oTable.Range.Rows(oTable.Rows.Count).Range.Select
Selection.InsertRowsBelow 1
Selection.Collapse (wdCollapseStart)
myrow = Selection.Information(wdStartOfRangeRowNumber)
If strHeaderText = " in-Ch." Then
With Selection
.TypeText Text:=StrConv(Trim(strFWitnessName),
vbProperCase)
.MoveLeft unit:=wdWord, Count:=3, Extend:=wdExtend
.Font.UnderLine = wdUnderlineNone
.MoveRight unit:=wdCell
Selection.InsertCrossReference
ReferenceType:="Bookmark", ReferenceKind:= _
wdPageNumber, ReferenceItem:=strBN,
InsertAsHyperlink:=True, _
IncludePosition:=False
End With
End If
AT THIS POINT I NEED TO RETURN THE INSERTION POINT TO ITS LOCATION PRIOR TO
EXECUTING ABOVE CODE. I'm quite certain I could use yet another bookmark
but is there another way?
TIA for any help!
Debra