VBAtoAccess
New member
- Local time
- Today, 13:28
- Joined
- Sep 21, 2011
- Messages
- 1
(Access 2007) using VBA I need to convert "Long binary data" type to pdf "Adobe Acrobat Document" in an OLE Object Access table.
If I drop/drag the document into the table I get the "Adobe Acrobat Document" type that allows me to double click to open.
If I copy the same file using VBA, the "Long binary data" type doesn't allow me to open with double click.
Any ideas how to convert the file to a PDF format during, before, or after I copy the file to the table? I don't see any way to cast the file to be an OLE Object of PDF type... Any help - great appreciated.
Code snippet.
-----
Dim curDatabase As DAO.Database
Dim MyTrackingTable As DAO.Recordset
Set curDatabase = CurrentDb()
Set MyTrackingTable = CurrentDb.OpenRecordset("TrackingTableName")
MyTrackingTable.AddNew
MyTrackingTable("Report") = PathToFile + "DaileyReport.pdf"
MyTrackingTable.Update
-----
If I drop/drag the document into the table I get the "Adobe Acrobat Document" type that allows me to double click to open.
If I copy the same file using VBA, the "Long binary data" type doesn't allow me to open with double click.
Any ideas how to convert the file to a PDF format during, before, or after I copy the file to the table? I don't see any way to cast the file to be an OLE Object of PDF type... Any help - great appreciated.
Code snippet.
-----
Dim curDatabase As DAO.Database
Dim MyTrackingTable As DAO.Recordset
Set curDatabase = CurrentDb()
Set MyTrackingTable = CurrentDb.OpenRecordset("TrackingTableName")
MyTrackingTable.AddNew
MyTrackingTable("Report") = PathToFile + "DaileyReport.pdf"
MyTrackingTable.Update
-----