Insert Object using VBA?

R

Rick

Currently,
I have a form with a Bound Object Frame linked to a OLE
Object.

Does anymore know of a way to Insert Object using VBA with
a command button?

Thanks
 
S

SJ

Fileobject is the name of the control bound to that field

you need to know the class.

this is for word documents

the line
.Action = acOLEActivate 'display the file

you don't need this unless you want to view the file.


With Me.FileObject 'link the merged
document to the control
.Class = "Word.Document"
.OLETypeAllowed = acOLELinked
.SourceDoc = Me.FileDirectory & "\" & Me.FileName
.Action = acOLECreateLink
.Action = acOLEActivate 'display the file
End With
 
K

kid A

Rick said:
Currently,
I have a form with a Bound Object Frame linked to a OLE
Object.

Does anymore know of a way to Insert Object using VBA with
a command button?

Thanks
 
Top