RichText in Word

R

Roby E Martins

Hi,

I´m Roby, vb Developer.

I´m trying to paste some RichText in the Word, but
without success.

Paste it in the Word will only show the RichText Script.

Please Help!

Thank you,
Roby E Martins
 
J

JGM

Hi Roby,

Try someting like this (From a Word userform):

'_______________________________________

Dim CurrentPara As Paragraph

Const RTFDocPathandName As String = _
"D:\Test\RTF_Doc\myrtf.rtf"

Set CurrentPara = Selection.Paragraphs(1)

RichTextBox1.SaveFile RTFDocPathandName

Set myRTFdoc = Documents.Open(FileName:=RTFDocPathandName,
Visible:=False)

CurrentPara.Range.FormattedText = myRTFdoc.Content.FormattedText

myRTFdoc.Close

Set CurrentPara = Nothing
Set myRTFdoc = Nothing
'_______________________________________

HTH
Cheers!

--
_______________________________________
Jean-Guy Marcil
(e-mail address removed)

"Roby E Martins" <[email protected]> a écrit dans le message de [email protected]...
Hi,

I´m Roby, vb Developer.

I´m trying to paste some RichText in the Word, but
without success.

Paste it in the Word will only show the RichText Script.

Please Help!

Thank you,
Roby E Martins
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top