tags:

views:

587

answers:

1

is it possible? I couldn't find any code that does that.

+3  A: 

When I want to write a macro (=VBA) in Office, I just start by recording a macro, and then do what you want to do manually.

The recorded macro will help you on your way.

This is what I ended up with:

Sub Macro1()
'
' Macro1 Macro
'
'
    Selection.InlineShapes.AddOLEObject ClassType:="WordPad.Document.1", _
        FileName:="", LinkToFile:=False, DisplayAsIcon:=False
End Sub

Answer is: use the AddOLEObject method

GvS