Access 97 : Bookmark in word document

  • Thread starter Thread starter Monkeytoo
  • Start date Start date
M

Monkeytoo

Is it possible (with VBA code from an access application) to know if a
bookmark exist in a word document (.dot) ?
 
Is it possible (with VBA code from an access application) to know if a
bookmark exist in a word document (.dot) ?

Yes. You'll need to launch Word using automation, e.g.

Dim objWord As Object
Set objWord = New Word.Application
objWord.Documents.Add "C:\My Documents\xyz.DOT"
Debug.Print objWord.ActiveDocument.Bookmarks.Count

or loop through the Bookmarks object's Item collection looking for the
name of the bookmark.
 
Back
Top