You posted this code originally and claimed that is works:
Code:
Sub ladate()
Dim date1 As Date
date1 = Now()
BookChange "DatePP, format(date1, "dd/mm/yy")
End Sub
Well, it is impossible for that code to work because a) if you paste it in Word VBA project it will not compile and b) it doesn't compile because there is no such method in the Word object model called "BookChange"
Now perhaps your code is attempting to call another procedure named "BookChange" and you neglected to post that procedure. Even so, your procedure still won't compile as your have the call improperly formatted.
Code:
Sub ladate()
Dim date1 As Date
date1 = Now()
BookChange "DatePP", Format(date1, "dd/mm/yy")
End Sub
Sub BookChange(strBMName As String, strDate As String)
Dim oRng As Range
Set oRng = ActiveDocument.Bookmarks(strBMName).Range
oRng.Text = strDate
ActiveDocument.Bookmarks.Add strBMName, oRng
lbl_Exit:
Exit Sub
End Sub
Now you have a procedure where you can pass arguments 1) Bookmark name and 2) Value to a custom procedure that functions as a method "BookChange"
oRng is a range yes. You set it parameters (i.e. start and end points) to the same range as the bookmark. Then assign a text string range.text property. This destroys the bookmark, so the last step is to recreate the bookmark around the defined range.
Hope this helps.