Good luck on understanding me on this one...<g>.
I have one <TWPRichText> component that has text and mergefields in it. I go to copy it over to another <TWPRichText> component with:
I'm copying it this way because there are certain paragraphs (which I can identify via code) that I don't want to send over to the destination.
This is where I'm not 100% sure. I'm starting to get the impression the mergefield objects in srcWPRichText, when they're copied over to destWPRichtext, are no longer marked as of type wpObjMergeField, but instead are now marked as type wpObjCustom (plus I think they're having some of their other TextObject properties reset, and not brought over).
If I do a MergeText on srcWPRichText, all is well. If I do a MergeText on destWPRichText, that component's WPRichTextStorageFormMailMergeGetText is never triggered.
In tracing through, I ran across this WPRTEDefs line, in TParagraph.Assign, that suggests to me I'm doing something wrong (or not at all):
bDifferentRTFProps := (Source.FRTFProps <> nil) and (FRTFProps <> nil) and (Source.FRTFProps <> FRTFProps);
So if my guess is right, I should somehow be associating destWPRichText with srcWPRichText's RTFDataProps. If that's the case, how do I do this? If that's not the problem, what else I might try?
And am I right that the objects of type wpObjMergeField are being copied over as type wpObjCustom?
Actually, I just noticed that objects of type wpobjTextObject aren't appearing in the copied over TWPRichText component (destWPRichText), so my guess is they're being set to type wpObjCustom, as are possibly any objects, during the copy due to my not having RTFProps shared between the two <TWPRichText> components?
I feel like I'm getting closer, but I'm definitely not there yet...:)
diamond