![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: How to read Word (.doc) file using DXL Topic Summary: Created On: 28-Feb-2003 14:18 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
I am developing a DXL script which can copy Object Text from DOORS into an existing Word file(doc format, not RTF). I used the OLE method to open that file, but I was stuck by the following issues: How to identify the Title, Table of Contents, Header, Footer, and Section Title(Heading) of an existing Word document using OLE method ? Whether or not OLE method can handle it ? or other solutions can handle it? My script needs to read every section tiltle(Heading) from Word document and compare them with the Object Heading in DOORS, then to decide where I should paste the Object Heading in Word file. Regards Wei Wang Motorola Canada Ltd weiwang@motorola.com |
|
![]() |
|
![]() |
|
Wei,
A basic strategy to use is to get the "Paragraphs" object from the document object. Then, iterate through each paragraph, checkng the "Outline Level" property of each paragraph. If the outlinel level is wdOutLineLevelBodyText, the paragraph does not have a heading style applied to it. Otherwise, you have found a heading. You can then use the "Range" property to copy the "FormattedText" to the windows clipboard, which will make it available to do comparisons on. I'm sure the actual solution would be a bit more complicated than that, but hopefully the ideas above are enough to get you started. I have a presentation called DOORS DXL - Adventures in Microsoft OLE Automation, which covers some of the details on how to use DOORS and DXL to interact with other Microsoft applications that support OLE/COM methods. ------------------------- Michael Sutherland michael@galactic-solutions.com http://galactic-solutions.com Edited: 28-Feb-2003 at 22:26 by Michael Sutherland |
|
![]() |
|
![]() |
|
Michael
Thank you very much, I will try the method you suggested. Wei |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
How to read Word (.doc) file using DXL
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.