Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Can i copy content from one document to another and still preserve the formatting of source text?
I have an input rtf file Input.rtf with below content
------------------------------------------
Microsoft Word editor comes with cool features. Aspose Word library helps programmers in automating Word formatting.
Prepared by Prasanth
--------------------------------------------
I have a placeholder document where i need to replace the content from Input.rtf. The <%TITLE%> has to be replaced with "Sample document" and the <%CONTENT%>
The content of Placeholder.doc is
<%TITLE%>
<%CONTENT%>
-------------------------------------------------
Can i replace the placeholders (enclosed in <% and %>) in the Placeholder.doc with the corresponding values from Input.rtf and preserve the formatting (Bold, Italics, Alignment etc). The desired output is (please note the formatting in the below text)
Sample document
Microsoft Word editor comes with cool features. Aspose Word library helps programmers in automating Word formatting.
Prepared by Prasanth
(I tried the replace function with
Regex regex = new Regex(@"(?.*?)")
and ReplaceEvaluator.Match.Groups("tag").value
Need help to copy the formatted text from input file.
regards
Prasanth