Hi,
I have created one editor using UltraFormattedTextEditor control, now i want to save the value of this control into word document with all formats. Please suggest me any way for this, first of all is this possible? my code for saving into word file as below, it saves file but without any format.
....
objWordApp = new CCWordApp(); objWordApp.Open(); objWordApp.SetFontName("Arial"); objWordApp.SetFontSize(10); objWordApp.InsertText(UltraFormattedTextEditor.Value.ToString()); docFilePath = System.IO.Path.GetFullPath("."); objWordApp.SaveAs(docFilePath + "\\" + "Documnet1"+ "_" + DateTime.Now.ToShortDateString().Replace("/", "_") + ".doc"); objWordApp.Quit();
Please reply me as early as possible.
Thanks in Advance....
The text being returned by the UltraFormattedTextEditor is an HTML encoded string. My guess is that the CCWordApp class either doesn't know how to do formatting, or is expecting RTF rather than HTML. I haven't used this class before, so I don't know the particulars.
-Tony
Actually, UltraFormattedTextEditor uses our own customer XML format. It's not HTML or RTF. So MS Word is not going to recognize it.
Where might someone get more information as to the acceptable elements and attributes for the custom XML format used within UltraFormattedTextEditors and UltraFormattedLinkLabels?
I cannot seem to find anything within the Infragistics API documentation.
Tim
Nevermind, I found another post with the link posted. Here is the link for all those looking.
http://help.infragistics.com/NetAdvantage/WinForms/2010.3/CLR2.0/?page=WinFormattedLinkLabel_Formatting_Text_and_Hyperlinks.html