- Joined
- Oct 5, 2001
- Messages
- 30,080
Can I take it that you are trying to go to a bookmark that is a number, read it, increment it by one, and then write the value back?
The problem is that a bookmark is defined to be of "text" type, and doesn't have a "value" property. What you need to do is select the bookmark text, and convert that text to an integer.

The problem is that a bookmark is defined to be of "text" type, and doesn't have a "value" property. What you need to do is select the bookmark text, and convert that text to an integer.
Code:
Sub Auto_open()
Dim orderNum As Integer
Selection.GoTo What:=wdGoToBookmark, Name:="mybm"
ActiveDocument.Bookmarks("mybm").Select
orderNum = CInt(Selection.Text) + 1
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.InsertAfter orderNum
ActiveDocument.Bookmarks.Add Range:=Selection.Range, _
Name:="mybm"
End Sub
