sanjay
Aug 20th, 2000, 05:00 AM
i want to copy the text of richtextbox to ms word
for this i used the clipboard.
i used the code to copy to the clipboard
Clipboard.SetText RichTextBox8.TextRTF, vbCFRTF
it works.
but when i used the code to copy to the MS word
r.Range.InsertAfter Clipboard.GetText(vbcfrtf)
{where r as document}
then what i see on the MSword is.
{\rtf1\ansi\ansicpg1252\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss MS Sans Serif;}}
{\colortbl\red0\green0\blue0;}
\deflang1033\pard\plain\f2\fs17 Ric\plain\f2\fs17\b hTextBox8
\par }
i have the text "richtextbox8" in the text box.
but when i use the "ctrl+v" to paste the text in the word then it pasted formatted text( that is what i want)
please give me the coding to insert the formatted text to the ms word.
waiting 4 reply
it would be a great help!!!!!!!!!!!!!!!!!!!!!!!!!!!
for this i used the clipboard.
i used the code to copy to the clipboard
Clipboard.SetText RichTextBox8.TextRTF, vbCFRTF
it works.
but when i used the code to copy to the MS word
r.Range.InsertAfter Clipboard.GetText(vbcfrtf)
{where r as document}
then what i see on the MSword is.
{\rtf1\ansi\ansicpg1252\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss MS Sans Serif;}}
{\colortbl\red0\green0\blue0;}
\deflang1033\pard\plain\f2\fs17 Ric\plain\f2\fs17\b hTextBox8
\par }
i have the text "richtextbox8" in the text box.
but when i use the "ctrl+v" to paste the text in the word then it pasted formatted text( that is what i want)
please give me the coding to insert the formatted text to the ms word.
waiting 4 reply
it would be a great help!!!!!!!!!!!!!!!!!!!!!!!!!!!