There are posts since 2009 asking about RPE removing formating when a script expression is used to export text. I am attempting to export text from doors which has Bold, bulleted, subscript, and indented text in it. All that is removed when using a script expression to filter some unwanted carriage returns and to enter a few Line breaks in other places ('\v' vertical tab in word). I am looking for a workaround for this problem. There must be a few FRE regarding the feature by now. I was thinking of exporting all the text using Data expressions which preserves all the formatting then writing a VB macro to do all the needed filtering. Is this the best solution? I am not familiar with DXL but should i pursue writing a DXL script or a batch file to alter the data before or after it leaves RPE?

I recommend adding tags to your RPE export to make it easy to find the pieces that need to be post processed. Then make a VBA script to find your tags and make the necessary changes. You can set RPE to automatically execute the macro when it's finished creating the word document so users won't even know it's running.

I've used this approach for making references in DOORS work as cross references in documents as well as for adjusting figure and table sizes to the published document size instead of the DOORS view size. The macros tend to take only a few seconds to run on documents that are several hundred pages long.

I would not recommend touching the text in DOORS. DOORS does NOT fully support RTF. It's possible for users to have cut and paste text into DOORS that will display fine, but will not work correctly once manipulated with DXL.

have you considered using Layout DXL in a column to get the desired formatting? If you can get the formatting that you need than this should be the least invasive solution and most likely the cheapest too.

I recommend adding tags to your RPE export to make it easy to find the pieces that need to be post processed. Then make a VBA script to find your tags and make the necessary changes. You can set RPE to automatically execute the macro when it's finished creating the word document so users won't even know it's running.

I've used this approach for making references in DOORS work as cross references in documents as well as for adjusting figure and table sizes to the published document size instead of the DOORS view size. The macros tend to take only a few seconds to run on documents that are several hundred pages long.

I would not recommend touching the text in DOORS. DOORS does NOT fully support RTF. It's possible for users to have cut and paste text into DOORS that will display fine, but will not work correctly once manipulated with DXL.

This was the solution I thought of as well, add tags before and after each segment to identify it then use some macro to treat each segment correctly. Do yo mind sharing a bit of the macro you used for this purpose?

have you considered using Layout DXL in a column to get the desired formatting? If you can get the formatting that you need than this should be the least invasive solution and most likely the cheapest too.

I have no experience working with DXL so I have no idea what using "a Layout DXL in a column" means at the moment. but I have a programming background so it should not be too difficult. Please let me know if there is some socumenentation that you recommened regarding the use of DXL and integrating it with RPE. Thanks for the suggestion.

This was the solution I thought of as well, add tags before and after each segment to identify it then use some macro to treat each segment correctly. Do yo mind sharing a bit of the macro you used for this purpose?

This example formats table of figures entries. These were set up in DOORS before we had RPE (I would make it so we could just use the RPE objects now, but this is a generic example of what to do) so we marked each DOORS object that goes in the table of figures using an attribute. The RPE template is set up so "qqq" is inserted before text that is supposed to be a Table of Figures entry and "zzz" is inserted before text that is supposed to be a Table of Tables entry.

The attached MS Word macro was run after the document is generated from RPE.

The macro basically just goes to the beginning of the document and finds all of the "qqq" text. The macro inserts a field to mark it as a Table of Figures entry. When it's all done with those, it goes back to the beginning and finds all of the "zzz" text and makes Table of Tables entries for them.

The part of the code that actually does the formatting you want to do (make a table of figures field in this case) can usually be recorded in MS Word by doing it once with the macro recorder on. To make it work on the whole document, you just add the loop to find your marker text with a while Selection.Find.Found loop around it.

Hope this helps. This technique can save a LOT of time mucking with data in DOORS or RPE. Especially if there's something not quite right with the data (like a user pasted RTF into DOORS that contains formatting that DOORS displays but doesn't formally support).