Discussion Locked

Access 97 OLE objects

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have a field in a table of OLE Object data type. This field links to Word documents. Is there a way to code a command button on a form which when clicked, shows the Word document for that record?

6 replies

by carquiza

Hi,

Why not try this code?
Insert this code to a button:
Sub Command_Click()
Set Word = CreateObject("word.application")
Word.Visible = True
Word.Documents.Open FileName:=App.Path & "\Name of Word Doc File.doc"
End Sub
Hope this help a bit.

Cheers,

Mel Arquiza
Home Page Design
http://hpd.welcome.to

by sl-campbell

Or
Use an OLE Container Object (Bound Object Field) on your form and bind it to the OLE field.

This discussion is closed to new replies.