J
Jen
Hello. I am trying to open a document from Access, and
have a bookmark on my table of contents page. I would
like to open to that bookmark but my code doesn't seem to
work. My code does open the document, just doesn't go to
the bookmark. Anyone see any obvious problems?
Dim WordObj As Word.Application
Dim WordDoc As Word.Document
Dim WordRange As Word.Range
Set WordObj = CreateObject("Word.Application")
Set WordDoc = WordObj.Documents.Open
("N:\Dats\DatsDQ\DQ Instructions.doc")
WordObj.Visible = True
'Go to bookmark named TableofContents
Set WordRange = WordDoc.GoTo(What:=wdGoToBookmark,
Name:="TableofContents")
Thank you in advance,
Jen
have a bookmark on my table of contents page. I would
like to open to that bookmark but my code doesn't seem to
work. My code does open the document, just doesn't go to
the bookmark. Anyone see any obvious problems?
Dim WordObj As Word.Application
Dim WordDoc As Word.Document
Dim WordRange As Word.Range
Set WordObj = CreateObject("Word.Application")
Set WordDoc = WordObj.Documents.Open
("N:\Dats\DatsDQ\DQ Instructions.doc")
WordObj.Visible = True
'Go to bookmark named TableofContents
Set WordRange = WordDoc.GoTo(What:=wdGoToBookmark,
Name:="TableofContents")
Thank you in advance,
Jen