Hi,
I have an instance of WPRichText with this:
"My name is <name>"
I want to replace "<name>" with the content of another WPRichText, so I did:
WPRichText1.Finder.ReplaceAll("<name>",WPRichText2.AsString);
The thing is, the replaced text apears as:
{\rtf1\ansi\deff0\uc1\ansicpg1252\deftab720{\fonttbl{\f0\fnil\fcharset1 Arial;}{\f1\fnil\fcharset2 Wingdings;}{\f2\fnil\fcharset2 Symbol;}}{\colortbl\red0\green0\blue0;\red255\green0\blue0;\red0\green128\blue0;\red0\green0\blue255;\red255\green255\blue0;\red255\green0\blue255;\red128\green0\blue128;\red128\green0\blue0;\red0\green255\blue0;\red0\green255\blue255;\red0\green128\blue128;\red0\green0\blue128;\red255\green255\blue255;\red192\green192\blue192;\red128\green128\blue128;\red0\green0\blue0;\red128\green128\blue0;}\wpprheadfoot1\paperw12240\paperh20160\margl567\margr740\margt1167\margb2830\headery254\footery254\endnhere\sectdefaultcl{\
If I do:
WPRichText1.Finder.ReplaceAll("<name>",WPRichText2.Text);
Then its OK, but I loose the formatting I had in WPRichText2.
I tried with Finder using Finder.FoundText but it happens the same thing.
So I ask, How do I replace the token <name> in WPRichText1 with the content of another WPRichText without loose the text format and without have this RTF code?
Thanks