1. Create a form based on your table where your .pdf files are kept(Record Source = TableName).
Create a Bound Object Frame (Control Source = OLE Field Name).
In Form View, double click on the Bound Object Frame, will open Acrobat with .pdf file in the current record.
2. Paste this behind a button:
Dim MyAppID
MyAppID = Shell("C:\Program Files\Adobe\Acrobat 4.0\Reader\AcroRd32.exe", 1) 'edit this to location of your Adobe
3. Paste this behind a button:
Dim objAdobe As Object, strFile As String
strFile = "C:\My Documents\Test.pdf" 'this could reference a control
Set objAdobe = GetObject(strFile)
objAdobe.Application.Visible = True
Set objAdobe = Nothing
For option 3 to work I think you will have to have the Full Version of Reader installed
Does option 3 work if you use it as in my example, substitute your own location and file name. You might get a solution tonight if it does. I've woken up a bit.
Can you post table name, field name to search on and OLE field name. As I said, a search can't be performed on an OLE field.
Ideally you will have a Text field with the location and file name of each embedded .pdf file.
Finding the record is no problem. The pdf is embeded not linked so a path doesn't exist. There is a text field to search on.
In my code I've used a snapshot recordset and have the record and field I want to launch from. It's just launching from the embeded object that is giving me trouble.
My apologies for not reading your post correctly, the only method I am aware of to launch/edit embedded files is to double-click on a Bound Object Frame.
You might try this method if you are still looking,
Create form
Create control that references OLE object, obj
Create an event procedure for form_open that contains the following
obj.action = acOLEActivate
Have your code open the form to the record containing the pdf you wish to view, and it should launch Adobe when the form opens
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.