Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: DXL and Bookmarks in Word..
Topic Summary:
Created On: 18-Jun-2003 10:23
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by Arne Styve, on Monday, June 30, 2003 1:56 PM

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
 18-Jun-2003 10:23
User is offline View Users Profile Print this message


Arne Styve

Posts: 7
Joined: 9-May-2003

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
Report this to a Moderator Report this to a Moderator
 27-Jun-2003 09:44
User is offline View Users Profile Print this message


Arne Styve

Posts: 7
Joined: 9-May-2003

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
Report this to a Moderator Report this to a Moderator
 27-Jun-2003 11:18
User is offline View Users Profile Print this message


Jonathan Marshall

Posts: 27
Joined: 10-Apr-2003

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
Report this to a Moderator Report this to a Moderator
 30-Jun-2003 13:56
User is offline View Users Profile Print this message


Arne Styve

Posts: 7
Joined: 9-May-2003

Answer 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

Edited: 30-Jun-2003 at 14:00 by Arne Styve
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.