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: Updating Word titlebar via DXL
Topic Summary:
Created On: 21-Oct-2008 20:00
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.
 21-Oct-2008 20:00
User is offline View Users Profile Print this message


Agustine da Silva

Posts: 6
Joined: 26-Sep-2008

Hi,

I'm trying to access the Word 2000 titlebar and read/update the text that's displayed there.

I've read up on OLE Automation and I've also searched this forum but I can't find a way to read that particular attribute. On MSDN, it indicated that the titlebar text can be accessed using the 'Caption' attribute, but that doesn't work.

Through trial and error, I've discovered that Caption isn't part of the BuiltInDocumentProperties object. In fact, the only way to retrieve the document name is using the Word object and accessing the 'Name' attribute.

I'd really appreciate any suggestions anyone might have. Thanks.


Agustine
Report this to a Moderator Report this to a Moderator
 21-Oct-2008 20:33
User is offline View Users Profile Print this message


Kevin Murphy

Posts: 120
Joined: 16-Jan-2008

Isn't that value in the title bar just the name of the current Word document? If so, why does this not work for you? What exactly are you trying to accomplish?

-------------------------
Kevin Murphy
http://www.baselinesinc.com
Report this to a Moderator Report this to a Moderator
 21-Oct-2008 21:04
User is offline View Users Profile Print this message


Agustine da Silva

Posts: 6
Joined: 26-Sep-2008

After exporting a module from Doors to Word, I'm trying to set the Title property and the titlebar to a particular string. Setting the Title property (via BuiltInDocumentProperties) is easy but I can't seem to find a way to set the text of the titlebar.

I can use:

oleGet(objWord, "Name", strName)
-objWord is the Word.Application
-strName is a string which will hold the value of "Name"

to retrieve the document name (which is normally the same as the text displayed in the titlebar), but I cannot update it.

olePut(objWord, "Name", "Test.doc") doesn't work (titlebar isn't updated).

"Caption" isn't part of BuiltInDocumentProperties and this link (Update Word Document Statistics in the Title Bar) seems to indicate that updating the titlebar is simply a matter updating the Caption attribute, but I don't know how to access it.

Edited: 21-Oct-2008 at 21:05 by Agustine da Silva
Report this to a Moderator Report this to a Moderator
 22-Oct-2008 16:50
User is offline View Users Profile Print this message


Kevin Murphy

Posts: 120
Joined: 16-Jan-2008

That's because "Caption" is a member of Window...

So in VBA:

ActiveDocument.Windows(1).Caption = "Hello world"

will get you what you want.

So you need a window object, and then you set the caption there.

Feel free to post your DXL and I'll take a quick look at it.

-------------------------
Kevin Murphy
http://www.baselinesinc.com
Report this to a Moderator Report this to a Moderator
 22-Oct-2008 20:19
User is offline View Users Profile Print this message


Agustine da Silva

Posts: 6
Joined: 26-Sep-2008

Whoops, I didn't know I needed to use the ActiveWindow object. I got it to work now.

Thanks for your help Kevin!


Agustine
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.