Results 1 to 6 of 6
  1. #1
    trevor40's Avatar
    trevor40 is offline Advanced db Manager
    Windows XP Access 2003
    Join Date
    Feb 2014
    Location
    Australia
    Posts
    402

    I need to view pdf files in an access form image or activex control

    Hi,
    I'm trying to create a form that has a list box with locations to files to view.
    so far i have created the form and it all works ok if i only try to view JPG viles.


    they show up and change as required depending on the list selection.
    What I need to do is view PDF type files as well.
    Can this be done?
    [form code below]

    Private Sub Form_Current()
    Forms![consignment note tracking - incoming history]!Text24.Requery
    End Sub
    Private Sub Text24_Click()
    Forms![consignment note tracking - incoming history]!Image27.Picture = Me.Text24
    End Sub

    this changes the list for each record and displays in an image frame.

    how do i associate a PDF type to this, i have added the acrobat access 3.0 type library but i'm not sure how to access it properly.
    please help.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Not sure Access 2003 can show pdf files. The fact code is working for jpg but not for pdf does indicate that. This is easy in Access 2007 - don't even need VBA.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I believe I have got an OLE object to preview PDF files before in Access 2003 but never tried to have it show both JPG and PDF dynamically. Have you tried getting an OLE object dedicated to PDF files to work?

  4. #4
    trevor40's Avatar
    trevor40 is offline Advanced db Manager
    Windows XP Access 2003
    Join Date
    Feb 2014
    Location
    Australia
    Posts
    402
    thanks for the advice, i have decided to just provide a link to the original program and load that,
    works for pdf but not picture files, it opens vueprint without the file eg - jpg, bmp. i'll try a different viewer ans see if that works.
    vueprint has command line options and i've tried them all.

    [code now]
    If Right(Me.Text24, 3) = "pdf" Then
    stAppName = "C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe " & Me.Text24
    Call Shell(stAppName, 1)
    Else
    stAppName = "C:\Program Files\VuePrint\vueprint.exe -" & Me.Text24
    Call Shell(stAppName, 1)
    End If

  5. #5
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    614
    Try with web browser control -
    Code:
    Sub ShowFileOnForm(strPath as String)
    Me.WebBrowser1.Navigate strPath
    End Sub

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by trevor40 View Post
    thanks for the advice....
    That seems as though it should work. I guess another app like picture viewer or something should open the picture files.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Link image files to Access table
    By amerifax in forum Access
    Replies: 12
    Last Post: 07-03-2013, 03:50 AM
  2. activex control (ado data control)
    By metokushika in forum Access
    Replies: 4
    Last Post: 11-07-2011, 12:45 AM
  3. Replies: 2
    Last Post: 10-10-2011, 10:58 AM
  4. Replies: 5
    Last Post: 12-27-2010, 06:59 PM
  5. Image control in MS Access
    By celestialcitizen in forum Forms
    Replies: 6
    Last Post: 07-03-2009, 03:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums