bobleonard
Programmer
Hi,
The complete code is:
Set wordobj = CreateObject("Word.Application")
'wordobj.ChangeFileOpenDirectory = "C:\Aword\"
wordobj.Visible = True
wordobj.Documents.Add Template:="C:\Aword\awordtemplate.dotm", NewTemplate:=False
Selection.Goto What:=wdGoToBookmark, Name:="Pnumber"
Selection.Typetext CStr(Me![ID])
I can step through the code until I hit the Selection.goto line?? Then I get the error: Variable not defined and the expression: wdGoToBookmark—highlighted??
Seems strange to me…I would have thought this to be a reserve word or something like that.
thanks,bob