Anybody have any luck creating an RTF-file directly, then simply opening it with MS-Word? I've had some luck with basic RTF heading and color table stuff, but need to add a huge table directly with OLE diagrams in it. I figure the code would look like this:
-Louie llandale - Mon May 20 15:01:11 EDT 2013 |
Re: Create RTF File Table Hi, I tried this long ago and lost the code. I remember that it was a real nightmare... Mostly about dealing with tables an pictures. Have you envisaged to export in HTML instead? It is much easier and it is pretty simple to import HTML chunks into MS Word (via "putHTMLFragment"). Regards |
Re: Create RTF File Table adevicq - Wed May 22 03:31:17 EDT 2013 Hi, I tried this long ago and lost the code. I remember that it was a real nightmare... Mostly about dealing with tables an pictures. Have you envisaged to export in HTML instead? It is much easier and it is pretty simple to import HTML chunks into MS Word (via "putHTMLFragment"). Regards HTML? Gads, I'm struggling something awful with this "OLE" stuff. I cannot remember anything so I have to write functions for EVERYTHING. |
Re: Create RTF File Table llandale - Wed May 22 11:15:10 EDT 2013 HTML? Gads, I'm struggling something awful with this "OLE" stuff. I cannot remember anything so I have to write functions for EVERYTHING. I am possibly missing something, but why not modify the unencrypted rtf exporter that comes with DOORS. This is how most company exporters are created they tend to be many times faster and more reliable than the exporters that interact with word directly. Make sure you have a copy of the RTF specification when you start, the first step is to create a few standard string constants for your rtf strings, especially if you plan to replicate diff functionality in word. |
Re: Create RTF File Table Richard_Good - Thu May 23 12:03:41 EDT 2013 I am possibly missing something, but why not modify the unencrypted rtf exporter that comes with DOORS. This is how most company exporters are created they tend to be many times faster and more reliable than the exporters that interact with word directly. Make sure you have a copy of the RTF specification when you start, the first step is to create a few standard string constants for your rtf strings, especially if you plan to replicate diff functionality in word. What you are missing is that ... I forgot about the RTF exporter. I hate it when that happens. yes, that should go a long way to help. Please explain your last sentance. -Louie |
Re: Create RTF File Table llandale - Thu May 23 13:12:06 EDT 2013 What you are missing is that ... I forgot about the RTF exporter. I hate it when that happens. yes, that should go a long way to help. Please explain your last sentance. -Louie Hi Louie, A few examples attached. I use the headers to produce a diff report in a word table where red and blue indicate deleted and inserted text. I use things like reduced font table to strip out the spurious rtf that can get into DOORS, but can't be seen which can mess up your exports. Note that these sort of tools will be retired by RPE, which is pretty good and assuming your company has enough bags of gold for IBM is what I reccomend for any fancy export tasks, putting the colour table in your rtf headers is obviously very important for producing coloured markup - hope it helps. Note that document headers need to define the various fonts that are used, paragraph rtf headers need to define much less. Don't envy you the joys of getting to know the RTF specification - usually best avoided if your sanity is imortant to you ;-) Richard
const string ReducedFontTable = "\\deff1{\\fonttbl
const string DiffRepHeader = "{\\rtf1\\deff1000{\\fonttbl {\\f0\\froman\\fprq2\\fcharset0 Times New Roman;}
///////////////////////////////////////////////////////////
|
Re: Create RTF File Table Richard_Good - Wed May 29 08:02:35 EDT 2013 Hi Louie, A few examples attached. I use the headers to produce a diff report in a word table where red and blue indicate deleted and inserted text. I use things like reduced font table to strip out the spurious rtf that can get into DOORS, but can't be seen which can mess up your exports. Note that these sort of tools will be retired by RPE, which is pretty good and assuming your company has enough bags of gold for IBM is what I reccomend for any fancy export tasks, putting the colour table in your rtf headers is obviously very important for producing coloured markup - hope it helps. Note that document headers need to define the various fonts that are used, paragraph rtf headers need to define much less. Don't envy you the joys of getting to know the RTF specification - usually best avoided if your sanity is imortant to you ;-) Richard
const string ReducedFontTable = "\\deff1{\\fonttbl
const string DiffRepHeader = "{\\rtf1\\deff1000{\\fonttbl {\\f0\\froman\\fprq2\\fcharset0 Times New Roman;}
///////////////////////////////////////////////////////////
Something has to exist for it to be important. Your original idea hit the mark, monkey-see-monkey-do for "rtfexp.exe". You'd be shocked to notice the difference in the very end of the report between:
Took me 2 days to track that one down. I'm exporting a table with a header and 2 rows. The 1st one finally worked. the 2nd one caused MS-Word to put the header row on each new page, but tried to make an infinite number of pages. Kept having to cancel MS-Word. Anyway the basics are now working, thanks. -Louie |