Insert Object using VBA?

  • Thread starter Thread starter Rick
  • Start date Start date
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
 
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
 
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
 

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

Back
Top