Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 17th, 2007, 12:47 AM
Authorized User
Points: 245, Level: 4
Points: 245, Level: 4 Points: 245, Level: 4 Points: 245, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2006
Location: Houston, TX, USA.
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ricespn
Default embeding an OLE object

Hi Guys,

I would like to know if some of you can help me on how to embed an OLE object into an OLE Field in Microsoft Access 2003 Database?

So far I have a form with the OLE container, I can load the image using this code:

Dim strFile As String

strFile = "C:\test\document.pdf"

OLE1.CreateEmbed strFile

So, now I want to embed this document into the field, I used this insert and it works:

Set gRS1 = gCon.Resultset("Insert into pdfDocs (docs) values('" & OLE1.SourceDoc & "')")
Set gRS1 = Nothing

The thing is that the OLE object gets saved as a Long Binary Data and I would like to be as a Adobe Acrobat Document so that the user can click on the field and it will open in Acrobat reader.

Any ideas?

:D

=======================
Strange and crazy, but everything is possible
__________________
=======================
Strange and crazy, but everything is possible


Similar Threads
Thread Thread Starter Forum Replies Last Post
The OLE object is empty leegweaver Access VBA 4 June 20th, 2008 07:59 AM
ole object insertion vinodkselpy Crystal Reports 0 March 1st, 2007 07:31 AM
OLE Object based on If statement lryckman Access VBA 3 October 25th, 2005 02:40 PM
OLE object in ASP MDrumm BOOK: Beginning ASP 3.0 3 June 18th, 2005 10:48 AM
OLE Object Type? j.gonsalves@ntlworld.com Access VBA 1 October 20th, 2004 02:16 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.