![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Updating Word titlebar via DXL Topic Summary: Created On: 21-Oct-2008 20:00 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
Whoops, I didn't know I needed to use the ActiveWindow object. I got it to work now.
Thanks for your help Kevin! Agustine |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Updating Word titlebar via DXL
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.