How can I add an .msg file to a word document using VBA.

M

Mustafa Karakas

I can add picture, xls, etc files to a word document using vba. But for msg
files I havent find a way.
 
M

Michael Bauer

Hi Mustafa,

in Word 2000 I can use Document.Shapes.AddOLEObject( ,MyFileName)
 
M

Mustafa Karakas

thanks for your answer Michael;
but that is not what I want. I want to put the data to the word.
as an example, for .doc, .txt, .rtf files I'm using

oAppWord.Selection.InsertFile sFileName

and it is putting the data to word documet not the object.
I want to make some thing like this.

(I think there is an long way yo the this. I should open .msg with outllooks
compenents and get the data and add it to the word.
but I did'nt tried this.)
 
Top