RtfDomParser.RTFWriter.TestClipboard C# (CSharp) Method

TestClipboard() static private method

Test generate rtf text and copy to windows clipboard after execute this function , you can paste rtf text in MS Word
static private TestClipboard ( ) : void
return void
        internal static void TestClipboard()
        {
            System.IO.StringWriter myStr = new System.IO.StringWriter();
            RTFWriter w = new RTFWriter( myStr );
            TestBuildRTF( w );
            w.Close();
            System.Windows.Forms.DataObject data = new System.Windows.Forms.DataObject();
            data.SetData( System.Windows.Forms.DataFormats.Rtf , myStr.ToString());
            System.Windows.Forms.Clipboard.SetDataObject( data , true );
            System.Windows.Forms.MessageBox.Show("OK, you can paste words in MS Word.");
        }