![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: DXL and Bookmarks in Word.. Topic Summary: Created On: 18-Jun-2003 10:23 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Jonathan, THANK YOU VERY MUCH !! This was exactly what I was looking for. I hadn't even considered this way of doing it. Thanks again! Regards Arne | |
![]() |
|
Hi,
A quick qestion regarding moving the cursor in Word to a bookmark: How do you write the DXL-code that corresponds to the VBA-code: Selection.GoTo What:=wdGoToBookmark, Name:="InsertHere" I've tried various approaches, including: OleAutoArgs objArgBlock = create clear( objArgBlock ) put( objArgBlock, "what", 0xFFFFFFFF ) put( objArgBlock, "name", "InsertHere" ) checkRes(oleMethod( objDoc, "GoTo", objArgBlock )) but I only get OLE method failed: OLE problem: Bad parameter Can anyone out there help ,y ? Regards Arne Styve |
|
![]() |
|
![]() |
|
Hi Ron,
and thanks for the tip, but it did not work. Here's the code I use: clear( objArgBlock ) put( objArgBlock, "What", 0xFFFFFFFF ) //wdGoToBookmark is according to VBA 0xFFFFFFFF put( objArgBlock, "Which", 0 ) put( objArgBlock, "Count", 0 ) put( objArgBlock, "Name", "InsertHere" ) //Name of bookmark print( "About to call GoTo...\r\r" ) checkRes(oleMethod( objDoc, "GoTo", objArgBlock )) but I still get "Ole Method failed, bad parameter". Any other ideas would be greatly appreciated. Thanks! Regards Arne |
|
![]() |
|
![]() |
|
Arne
This function should work: bool setPositionToBookmark( OleAutoObj objDoc, string bookmarkName ) { bool bookexists OleAutoObj objBookMarks OleAutoObj objBook OleAutoArgs objArgBlock oleGet(objDoc, "Bookmarks", objBookmarks) if (null objBookmarks) { ack "Unable to get bookmarks collection" return false } clear objArgBlock put(objArgBlock, bookmarkName) oleMethod( objBookmarks, "Exists", objArgBlock, bookexists ) if ( bookexists ) { oleMethod(objBookmarks,"Item",objArgBlock, objBook) oleMethod(objBook, "Select") return true } else { return false } } Jon. ------------------------- Jonathan Marshall EADS Astrium |
|
![]() |
|
![]() |
|
Jonathan,
THANK YOU VERY MUCH !! This was exactly what I was looking for. I hadn't even considered this way of doing it. Thanks again! Regards Arne Edited: 30-Jun-2003 at 14:00 by Arne Styve |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
DXL and Bookmarks in Word..
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.