Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 139
  • Last Modified:

Word Ole special Call

I want to use bookmars with Delphi 2 / Word 95 using Variants and Ole Automation.
The Word 7 function is :
EditBookmark .Name:="TEMP_BK", .Add

How can I call this from Delphi using a variant (I can not send the .Add function), I tried many things, but I could not do it.

Thanks for help
0
letourmy
Asked:
letourmy
  • 2
  • 2
1 Solution
 
sperlingCommented:
WordBasic := CreateOLEObject('Word.Basic');
.
.
.
WordBasic.EditBookmark('TEMP_BK', TRUE);

This worked for me...

Regards,

Erik.
0
 
letourmyAuthor Commented:
Thank you, it works fine but this works to create a bookmark.
How can I go to a specific bookmark ?
0
 
sperlingCommented:
Hmmm... I ain't sure, as I ain't got the english version of word. But you could try EditGoto('NameOfBookmark')

Regards,

Erik.
0
 
letourmyAuthor Commented:
Thank you very much, your answer was very useful.

Laurent
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now