Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bookmarks In Word ( How the hell do u do that ? )!!!

Status
Not open for further replies.

BuilderSpec

Programmer
Dec 24, 2003
383
GB
Hi all

Tricky problem for me hoping for an expert out there.

Got a C++ Builder program using the WordApplication object.

Have got some working code to find and go to a bookmark in a Word Document. this code is :

bmk2 = WordApplication.Exec(Procedure("EditBookmark")<< "ABC123" << 1 << 0 << 1 << 0 );


This is the equivalent of the VBA code
ActiveDocument.GoTo wdGoToBookmark, , , "test"

HOWEVER...

This code does not find bookmarks that are embedded. For example you can add a text box to a document and add a bookmark inside the text box. The existing VBA code will only find the bookmark if the text box is highlighted.

In VBA you get round this by using the different method of bookmark selection :

ActiveDocument.Bookmarks("test").Select

This will find a bookmark anywhere.. fantastic !

My question is : does anyone know the equivalent C++ Builder code to do the above ?

Regards

BuilderSpec




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top