Insert RTF into a Word document

M

melon

Supposed I have some RTF text (not on a file) and I want to put them
in Word document, how am I going to do that.
 
M

melon

Supposed I have some RTF text (not on a file) and I want to put them
in Word document, how am I going to do that.

Should be more specific. I am trying to create a Word document from
Outlook. I will need to insert some RTF text into Word, hopefully
preserving all the formatting.
 
S

StevenM

To: Melon,

I'm not forsure that I understand what you need. I did the following and it
appeared that the RTF text copied from one document to another document
without losing any of its formatting. Whatelse do you need?

Sub OpenRtf()
Dim rtfDoc As Document
Dim actDoc As Document
Dim oRange As Range

Set actDoc = ActiveDocument
Set oRange = actDoc.Range
oRange.Collapse wdCollapseEnd
Set rtfDoc = Documents.Open("c:\path\file.rtf")
rtfDoc.Range.Copy
oRange.Paste
End Sub

Steven Craig Miller
 
M

melon

Well almost.... it is not very feasible to use copy and paste to
insert the RTF strings. I was looking for something like

doc.Bookmarks.get_Item(something).Range.InsertRTFAfter(RTFstring);

But I guess no such method exists.
 

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