End Property Example

This example compares the ending position of the "temp" bookmark with the starting position of the "begin" bookmark.

Set Book1 = ActiveDocument.Bookmarks("begin")
Set Book2 = ActiveDocument.Bookmarks("temp")
If Book2.End > Book1.Start Then Book1.Select

This example retrieves the ending position of the selection. This value is used to create a range so that a field can be inserted after the selection.

pos = Selection.End
Set myRange = ActiveDocument.Range(Start:=pos, End:=pos)
ActiveDocument.Fields.Add Range:=myRange, Type:=wdFieldAuthor

This example changes the ending position of myRange by one character.

Set myRange = ActiveDocument.Paragraphs(1).Range
myRange.End = myRange.End - 1