• 0

[C#/MS Word 2000] Merging RTF problem


Question

Hey peeps.

I'm having a bit of trouble with something i'm making. I have a RichTextBox in a letters form that I am allowing the user to edit the contents of. They can also do some basic formatting, such as changing font, alighnment, bold, italic etc. When done, they will save the change to a database record. Later, this editted letter will need to be printed off, using a mail merge. The idea was to have the letter body stored in one database field and then use that as a single merge field. I'm trying to test the merge part by using the RTF string as a merge field, but when you try merge it, Word just reads it as a string (unsurprisingly) rather than picking up the formatting. Any ideas how I can do this?? I chose an RTF box rather than using Word integration for performance reasons.

Example rtf data:

{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}}

\viewkind4\uc1\pard\lang1033\f0\fs17 Dear Mr Test\par

\par

Thank you for contacting us with regards to changing the ownership.\par

\pard\qc\ul\i\par

We can confirm that we have updated our blah blah blah.\par

\par

Sincereley,\ulnone\i0\par

\pard\par

Testy Balls\par

}

Any help is appreciated!

Thanks

Steve

Link to comment
https://www.neowin.net/forum/topic/561101-cms-word-2000-merging-rtf-problem/
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.