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: Triggering the "web layout" in Microsoft Word via a DXL script
Topic Summary:
Created On: 26-Feb-2007 00: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.
Answer This question was answered by Pranav Chandrasekhar, on Tuesday, February 27, 2007 7:07 PM

Answer:

Thank you very much for your help Shawn! It worked just fine.

 26-Feb-2007 00:18
User is offline View Users Profile Print this message


Pranav Chandrasekhar

Posts: 101
Joined: 16-May-2006

I am currently using a DXL script to export a set of formal modules in to Word format. The script performs the export and also saves the newly created word document in a desingated location on my local drive. The export is in the table format. Unfortunately, the script triggers Microsoft Word in the "prit layout". As a result, only the first 2 columns of my export appear, and the rest get cut off. Changing the layout to "Web layout" fixes this problem. But it would be very helpful if I could have it open in web layout WHILE doing the export. Is there something in the DXL script I can add to facilitate this? Your input would be much appreciated. Thank you.

Regards,

Pranav
Report this to a Moderator Report this to a Moderator
 26-Feb-2007 17:37
User is offline View Users Profile Print this message


Shawn Stepper

Posts: 96
Joined: 6-Aug-2004

Here is a function to set the View. You will need to make sure you define all of the properties that are used here (cPropertyActiveWindow = "ActiveWindow" etc.) Pass one of the defined view constants in the viewMode variable.

-------------------------
Shawn Stepper
shawn.e.stepper@wellsfargo.com
Report this to a Moderator Report this to a Moderator
 26-Feb-2007 17:45
User is offline View Users Profile Print this message


Pranav Chandrasekhar

Posts: 101
Joined: 16-May-2006

Thanks a lot for the function Shawn!! I will test it out right away and let you know in case I hit any roadblocks. Thank you once again.

Regards,

Pranav
Report this to a Moderator Report this to a Moderator
 26-Feb-2007 21:47
User is offline View Users Profile Print this message


Pranav Chandrasekhar

Posts: 101
Joined: 16-May-2006

Hi Shawn,
                I was wondering if there is an API/programming guide for some of the methods/functions in your setWordView function. That way, I will not what values are valid for properties sucg as cPropertyView etc. Thank you.

Regards,

Pranav
Report this to a Moderator Report this to a Moderator
 26-Feb-2007 22:16
User is offline View Users Profile Print this message


Shawn Stepper

Posts: 96
Joined: 6-Aug-2004

I usually use the Word VBA Debugger to find this stuff. Another place you can look is in the VBA for Word help file. You can find it here (If you have Office 2003):

C:\Program Files\Microsoft Office\OFFICE11\1033\VBAWD10.CHM

-------------------------
Shawn Stepper
shawn.e.stepper@wellsfargo.com
Report this to a Moderator Report this to a Moderator
 27-Feb-2007 02:23
User is offline View Users Profile Print this message


Pranav Chandrasekhar

Posts: 101
Joined: 16-May-2006

Hi Shawn,
               Thank you for your prompt response to my post. I basically copied your function into my script and made the function call to setWordView from the wordExportVBA function of the exporter scripts. Within the function you sent me,I set the properties as follows:

cPropertyActiveWindow = "ActiveWindow"
cPropertyView = "View"
cPropertyType = "Type"

  I got an error on all the lines within the function with "oleResult". "oleResult" coult not be recognized and  I got an incorrect concatenation error. Any idea where this error stems from? Your input on this would be much appreciated. Thank you.

Regards,

Pranav
Report this to a Moderator Report this to a Moderator
 27-Feb-2007 18:20
User is offline View Users Profile Print this message


Shawn Stepper

Posts: 96
Joined: 6-Aug-2004

The oleResult function is actually part of Michael Sutherland's Excel Exporter. It's included here, but it will require some additional variables to be declared. You could simplify it to this:

void oleResult(string result) {
if (!null result) {
progressStop()
halt()
}
}

-------------------------
Shawn Stepper
shawn.e.stepper@wellsfargo.com
Report this to a Moderator Report this to a Moderator
 27-Feb-2007 19:07
User is offline View Users Profile Print this message


Pranav Chandrasekhar

Posts: 101
Joined: 16-May-2006

Answer Answer

Thank you very much for your help Shawn! It worked just fine.

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