P
Pat Hartman (MVP)
I am trying to automate word from Access and I can't seem to get the syntax
correct for referencing a bookmark in the header.
WordApp.Selection.GoTo What:=wdGoToBookmark, Name:="CycleName"
WordApp.Selection.TypeText Text:=rsDAO!CycleName
works fine in the body of the document but can't "see" bookmarks in the
header. So I tried:
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
WordApp.Selection.GoTo What:=wdGoToBookmark, Name:="CycleName"
WordApp.Selection.TypeText Text:=rsDAO!CycleName
But that didn't work either. I still got the "Word cannot find the
requested bookmark" message.
Can someone point me in the right direction?
correct for referencing a bookmark in the header.
WordApp.Selection.GoTo What:=wdGoToBookmark, Name:="CycleName"
WordApp.Selection.TypeText Text:=rsDAO!CycleName
works fine in the body of the document but can't "see" bookmarks in the
header. So I tried:
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
WordApp.Selection.GoTo What:=wdGoToBookmark, Name:="CycleName"
WordApp.Selection.TypeText Text:=rsDAO!CycleName
But that didn't work either. I still got the "Word cannot find the
requested bookmark" message.
Can someone point me in the right direction?