<p>I am trying to <strong>replace the current selection in Word (2003/2007)</strong> by some <strong>RTF string</strong> stored in a variable.</p>

<p>Here is the current code:</p>

<pre><code>Clipboard.SetText(strRTFString, TextDataFormat.Rtf)
oWord.ActiveDocument.ActiveWindow.Selection.PasteAndFormat(0)
</code></pre>

<p>Is there any way to do the same thing without going through the clipboard. Or is there any way to push the clipboard data to a safe place and restore it after?</p>

[{'answer_id': 22335, 'author': 'samjudson', 'author_id': 1908, 'author_profile': 'https://Stackoverflow.com/users/1908', 'pm_score': -1, 'selected': False, 'text': '<p>You can use a RichTextbox to convert RTF to text or vice versa.</p>\n\n<pre><code>RichTextBox r = new RichTextBox();\nr.Rtf = strRTFString;\nConsole.WriteLine(r.Text);\n</code></pre>\n'}, {'answer_id': 27425, 'author': 'Joel Spolsky', 'author_id': 4, 'author_profile': 'https://Stackoverflow.com/users/4', 'pm_score': 5, 'selected': True, 'text': '<p>Put the RTF in a file instead of the clipboard, then insert from the file, e.g.</p>\n\n<blockquote>\n  <p><code>Selection.InsertFile FileName:="myfile.rtf", Range :="", _\n  ConfirmConversions:=False, Link:=False, Attachment:=False</code></p>\n</blockquote>\n'}]
['https://Stackoverflow.com/questions/22326', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1508/']