ole2 question about inserting document object in Word
The vb code generated when I record the macro of inserting an object as an icon is:
Selection.InlineShapes.AddOLEObject ClassType:="Word.Document.8", FileName _
:="string defining the location of the file object", LinkToFile:=False _
, DisplayAsIcon:=True, IconFileName:= _
"C:\WINDOWS\Installer\{90110409-6000-11D3-8CFE-0050048383C9}\wordicon.exe" _
, IconIndex:=1, IconLabel:= _
"string defining the location of the file object"
Using this I wrote the following code: ( I am leaving out the declaration of the ole2.obj_type and other variables)