[AccessD] View PDF in Unbound Object Control

Robert Stewart rls at WeBeDb.com
Mon Dec 10 15:02:23 CST 2012


All,

I really need some input on this.  If it is not possible, please let me know.

I think I can do it with a .Net project and view the document in a browser
window using the different MIME format stuff the browser makes available.

But, is using a browser control also the answer here?


At 08:03 AM 12/7/2012, you wrote:
>Date: Tue, 04 Dec 2012 11:01:47 -0600
>From: Robert Stewart <rls at WeBeDb.com>
>To: accessd at databaseadvisors.com
>Subject: [AccessD] View PDF in Unbound Object Control
>Message-ID: <9D9D5636-0C88-4FA5-B7D2-0A99F7480EE6 at holly.arvixe.com>
>Content-Type: text/plain; charset="us-ascii"; format=flowed
>
>
> >All,
>
>
>I would like to be able to view different document types in the
>unbound object control.
>I have a table that gives me the UNC path to the file.  I have the
>extension of the file
>as a separate field in the table where the UNC path is.  I have
>limited the query to
>only PDF files.  In this case, there are only 2.  I want to be able
>to preview them in the
>control and double click them to open them in a PDF reader.
>
>The problem is that the SourceDoc property is being changed, but not 
>refreshed.
>Well, not to the point that the document is display in the object container.
>
>Below is the code I am using:
>
>Private Sub Form_Current()
>      Me.OLEUnbound4.SourceDoc = ""
>      Me.OLEUnbound4.SourceDoc = Me.txtFullPath
>      Me.txtSourceDoc = Me.OLEUnbound4.SourceDoc
>      Me.OLEUnbound4.Requery
>      Me.Refresh
>      Me.Repaint
>End Sub
>
>When I am on the first row, the value in SourceDoc is:
>\\sithou-sqldev\ssis_working\PhotoSamples\Data_Mart_Extracts_Rpt.pdf
>When I move to the second record, it is:
>\\sithou-sqldev\ssis_working\PhotoSamples\RT-201208-18101-49113240.pdf
>
>I am getting this from the third line of code where I get the value
>of SourceDoc
>and display it on the screen.
>
>I still see the first document in the object container and when i
>double-click on
>it, I get the first document.
>
>Any one have any ideas on how to make this work?
>
>
>
>
>
>Robert L. Stewart

Robert L. Stewart

Any fool can write code that a computer can understand. Good 
programmers write code that humans can understand. --Martin Fowler

www.WeBeDb.com
www.DBGUIDesign.com
www.RLStewartPhotography.com  


More information about the AccessD mailing list