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: WEXP - rtf to set font size
Topic Summary:
Created On: 26-Sep-2007 09:34
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.
 26-Sep-2007 09:34
User is offline View Users Profile Print this message


Sjors de Leeuw

Posts: 23
Joined: 18-Apr-2007

Hi

I need to export my module, and use a layout DXL column to export certain data to an object template in Word.
The layout DXL column values contains bold, italic and normal formatting. In order to have this formatting in the exported Word document too, I use <<attribute:keepFormat>>, where "attribute" is the name of the layout DXL column in my export view. This works fine. However, the font size in the exported document must be smaller than font size which is currently used in the exported attribute.

Does anybody know how to change the font size? Can this be done with rtf? (I already used {\\b ...text...} for example, and tried to use {\\fs10 ...text} to change the font size, but that doesn't work)

I also tried to assign a style to a column (in column name with the addition of :WordStyle, where WordStyle is the name of the style in MS Word, which has a smaller font size setting), but the "keepFormat" overrules this style setting.

Thanks in advance!

Regards
Sjors
Report this to a Moderator Report this to a Moderator
 26-Sep-2007 10:47
User is offline View Users Profile Print this message


Peter Albert

Posts: 232
Joined: 30-Dec-2005

Hi,

I see two possible solutions:

1) Modify the "Normal" style in the word template file such that it has the smaller font size. This will make the layoutDXL look correct, but has the disadvantage that you have to define a different style for all other text which previously was set to "Normal" in the exported file, e.g. all other exported attributes.

2) Add some sort of delimiter into the object template, e.g. "startLayout<<attribute:keepFormat>>endLayout" and use a Word Macro after the export to
- select the text between the delimiters,
- decrease the font size,
- delete the delimiters.
You can even tell WEXP to run this macro after the export.

Cheers,

Peter
Report this to a Moderator Report this to a Moderator
 26-Sep-2007 10:53
User is offline View Users Profile Print this message


Sjors de Leeuw

Posts: 23
Joined: 18-Apr-2007

Hi Peter,

Thanks.
Option 1 won't work, since I have more "keepFormat" attributes, which will have smaller size then too, which is not desirable.

Option 2 is something I had in mind too, but which wasn't preferred since I haven't got much experience with Word macros. Have you got an example which may help me to implement your proposal?

Regards
Sjors
Report this to a Moderator Report this to a Moderator
 26-Sep-2007 13:40
User is offline View Users Profile Print this message


Peter Albert

Posts: 232
Joined: 30-Dec-2005

Hi Sjors,

I quickly hacked the attached VB script. In its current form, it sets all font sizes between 'startFontSize' and 'endFontSize' to 6 and removes the delimiters. If you want different values, you just have to modify the variables c_start, c_end and c_newFontSize.

Cheers,

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