Getting Word97 Bookmark Names from Forms 4.5

From: <nwgarside_at_my-dejanews.com>
Date: Thu, 10 Dec 1998 06:02:13 GMT
Message-ID: <74no54$jm8$1_at_nnrp1.dejanews.com>



[Quoted] I have a Forms 4.5 application that uses OLE to start a new Word97 document based on a template. The template has a number of bookmarks defined and I would like to retrieve a list of the bookmarks and display the list in my Forms application.

I can get the number of bookmarks in the document using the following code:

  objActiveDoc := OLE2.GET_OBJ_PROPERTY(Word.hApp, 'ActiveDocument');
  objBookmarks := OLE2.GET_OBJ_PROPERTY(objActiveDoc, 'Bookmarks');
  numBookmarkCount := OLE2.GET_NUM_PROPERTY(objBookmarks, 'Count');

Can someone tell me how I now get the name of a particular bookmark? The VBA equivalent would be:

  strBookmarkName = ActiveDocument.Bookmarks(1).Name

...which would get the name of the first bookmark. However, I don't seem to be able to create a handle to an individual bookmark in the Forms app.

Thanks for any help you can offer...

Neil W. Garside

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Thu Dec 10 1998 - 07:02:13 CET

Original text of this message