![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Open Word OLE object in Word application Topic Summary: Created On: 31-May-2005 10:54 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hi,
I am trying to open a Word OLE which is stored in the object text of an object in the Word application. Does anybody has a solution for that problem? Thank you for help! Regards Karsten |
|
![]() |
|
![]() |
|
bool oleActivate(Object o)
string oleActivate(Object o, Column c, integer index) opens the embedded OLE in its host application. ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
Tony,
Excellent answer to Karsten's question. I have a follow-up question that is stumping me. I'm trying to open a Word OLE document which is stored in the object text of an object, make a change, and then save it back to DOORS. The attached code opens the Word document and makes a change, but it doesn't seem to store the change back to DOORS. I've tried different combinations of the last four commands: oleMethod( objWordDocument, "Save" ) oleMethod( objWordApplication , "Close" ) oleCloseAutoObject( objWordDocument ) oleDeactivate( current Object ) and none seem to give the desired result. ------------------------- Michael Sutherland michael@galactic-solutions.com http://galactic-solutions.com |
|
![]() |
|
![]() |
|
Michael,
this one has got me stumped. I have tried everything I can think of and the changes never get saved back to DOORS. The commands look correct and they match what I get when I open and edit the OLE manually and record the keystrokes as a macro in word. Anyone else got a clue? ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
Michael / Tony,
I use the following to open any OLE in its associated application, and haven't yet had any problems.... Object obj = current if (oleIsObject obj){ if (oleOpen obj == false) { ack "Problem trying to activate object\n" } } else { ack "Does not contain an embedded object\n" } Regards, Roy. Roy Bond MTU Aero Engines Munich roy-david.bond@muc.mtu.de |
|
![]() |
|
![]() |
|
Hmm, this is an interesting one. I couldn't reproduce the problem at first, but then I discovered that it makes a difference if the embedded document is displayed as an icon. Specifically, if the embedded document is displayed as an icon, the changes are not saved, but if it is not displayed as an icon, the changes are saved. The difference may really be that the document is opened externally and not in-place.
I think that in the case that Word is opened externally, Word is not informing DOORS that a change has taken place, so DOORS doesn't think that the attribute value needs to be changed. I've been trying to think of a workaround but haven't come up with anything nice just yet. Judith |
|
![]() |
|
![]() |
|
Michael,
I am still using 5.2 (long story) but it seems to work okay for me. I had to adjust the code a little. It may not make much of a difference on your end. |
|
![]() |
|
![]() |
|
Dale,
I tested you code, and it does work. I re-tested my code posted above, and now it works as well, where it didn't last week. Both times, the Word document was embedded as an Icon. Tony tested my original code and it didn't work for him, so there seems to be some situations where the code works, and some situations where it does not, but it is not yet apparant what that situation is. I am using DOORS 7.1 patch 012, build 71167. ------------------------- Michael Sutherland michael@galactic-solutions.com http://galactic-solutions.com |
|
![]() |
|
![]() |
|
This is frustrating.
I tried Dale's code. It does not work when OLE is displayed as icon, but works otherwise. I am using DOORS 7.1 patch 11, Word 2002, Windows 2000 Professional. ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
Tony,
I am using DOORS 7.1 patch 012 build 71167, Word 2002 SP3, Windows XP Pro 2002 SP1. I tried both version of the code again today, and they both worked, with the Word document embedded as an Icon. Thanks for the help, but now is seems you are more frustrated with the problem than I am. ------------------------- Michael Sutherland michael@galactic-solutions.com http://galactic-solutions.com |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Open Word OLE object in Word application
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.