![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Add Bookmark to word document Topic Summary: Word Bookmarks Created On: 26-Jan-2007 06:00 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
I spent a while surfing the forum for advice on Word Bookmarks. Found advice on how to select an existing bookmark, but nothing on how to add one in the first place. Here is my contribution:
///////////////////////////////////////////////////////////////////////////////////////////// //insert bookmark VBA Equivalent ///////////////////////////////////////////////////////////////////////////////////////////// // With ActiveDocument.Bookmarks // .Add Range:=Selection.Range, Name:="myBookmark" // End With //////////////////////////////////////////////////////////////////////////////////////////// //Retrieve the bookmarks collection OleAutoObj objBookMarks oleGet(objDoc, "Bookmarks", objBookmarks) clear objArgBlock put(objArgBlock, "Name", "myBookmark") oleMethod(objBookmarks, cMethodAdd, objArgBlock) have fun. Rgds Andrew ------------------------- Andrew Tagg Thales Air Systems, Melbourne Australia. andrew.tagg@thalesatm.com |
|
![]() |
|
![]() |
|
Additional to the post above, the following expands the idea to put a 'start' bookmark, some content, then an 'end' bookmark, then select the in between content and do something useful with it in Word. //insert bookmark VBA Equivalent //select the range ------------------------- Andrew Tagg Thales Air Systems, Melbourne Australia. andrew.tagg@thalesatm.com |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Add Bookmark to word document
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.