Hi,
I am using the following code to output the content of a UltraFormattedTextEditor control to a word document:
Me.ultraFormattedTextWordWriter1.Export(Me.SummaryUltraFormattedTextEditor, docWriter) where docwriter is a WordDocumentWriter.
I have set the appearance (font) of the texteditor to be Arial, and it shows as Arial in the texteditor, but when exported the font in the control is ignored.
When I examine the string that is being exported it contains markup tags as expected but no any all-enclosing tag that defines the for instance the font.
Here is the string being exported in a test sample: "Some arial text entered<br/>a new line of text<br/><br/>and another one<br/>".
How can I export and spesifying the font using the ultraFormattedTextWordWriter?
I have same problem here :(
Hello Kai,
I am just checking about the progress of this issue. Let me know if you need my further assistance on this issue.
Thank you for using Infragistics Components.
Hi Kai,
Thank you for the reply.
Yes when you are setting the value from a data base it will override the previous one, set in design time. You will have to add the tags manually when you are exporting the word document.
I have attached a simple sample that demonstrates this suggestion.
Please let me know if you have any additional questions.
Thank you for your response. However, I am not able to figure this out. I have set the Value-property of the control to <span style="font-family:Arial;"> </span>, but when I enter some text (ie: "My text sentence") into the bound control and save it to the database; only "My text sentence" is found in the database instead of what I was hoping for: "<span style="font-family:Arial;">My text sentence</span>.
I guess the loading of a DBnull-value into the bound control overwrites the value I have set at design-time? Will I have to append the formatting tags to the string (.Value) before saving using code in some pre saving event?
Thanks,
Kai
Hi Kai-Inge,
Thank you for posting to our forums.
Have you set the font through the Appearance property? If that is the case then, you should use the Value property instead of the Appearance property to set the Font data. For example to export a word file with bold text in Ariel you could use the following value:
<span style="font-family:Arial; font-weight:bold;">Some arial text entered<br/>a new line of text<br/><br/>and another one</span><br/>
Let me know if you have any additional questions.