Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Stenvang on September 22, 2014, 05:11:28 pm
-
When I'm using the element.Notes command it copies all the text written in the notes field which is good. However this fails if the text contains numbering.
I got the following description in the notes field of an element:
1. Do work
2. Report work
3. Work done
What I what is to put this in a table in word. So I use the following code:
table.Cell(1, 2).Range.Text = element.Notes;
which inserts the following text into the cell:
<ol>
<li>Do work</li>
<li>Report work</li>
<li>Work done</li>
</ol>
Any suggestions?
-
There are two methods namely GetFormatFromField and GetFieldFromFormat in the repository object.
q.
-
They both contain a "string format" parameter which I don't know how to set.
-
You can use getformatfromfield() to get RTF or HTML or TXT format of the notes.
You can then use that to put it into the word document.
(its all explained in the help file, you just have to read it)
Geert
-
To make it a bit more clear: supply either "TXT", "HTML" or "RTF" as string parameter for the format.
q.