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: 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
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.
 28-Feb-2003 14:18
User is offline View Users Profile Print this message


Wei Wang

Posts: 2
Joined: 4-Feb-2003


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
Report this to a Moderator Report this to a Moderator
 28-Feb-2003 22:25
User is offline View Users Profile Print this message


Michael Sutherland

Posts: 248
Joined: 13-Sep-2002

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
Report this to a Moderator Report this to a Moderator
 5-Mar-2003 15:35
User is offline View Users Profile Print this message


Wei Wang

Posts: 2
Joined: 4-Feb-2003

Michael

Thank you very much, I will try the method you suggested.

Wei
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 0 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 0 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.