Preview JPEG & PDF withing Access Forms

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chrisdavies
    New Member
    • Jul 2007
    • 11

    Preview JPEG & PDF withing Access Forms

    Hi Guys

    I'm trying to display a preview of jpg and pdf files from within an access form. I've created a tool to copy files to various locations on the network, but need users to have check that the file is what it should be. Hope that makes sense!

    I can't use an unbound object frame because this will not display jpgs in Office 2003 without installing Office Picture 2000 (or somthing like that..). I've tired the Activex Preview control, but am getting OLE errors, and I understand won't work with PDF.

    What I really want is to call the 'windows preview' that displays in explorer windows when the contents are picture and pdfs.

    Any ideas?

    Cheers - Chris
  • Jim Doherty
    Recognized Expert Contributor
    • Aug 2007
    • 897

    #2
    Originally posted by chrisdavies
    Hi Guys

    I'm trying to display a preview of jpg and pdf files from within an access form. I've created a tool to copy files to various locations on the network, but need users to have check that the file is what it should be. Hope that makes sense!

    I can't use an unbound object frame because this will not display jpgs in Office 2003 without installing Office Picture 2000 (or somthing like that..). I've tired the Activex Preview control, but am getting OLE errors, and I understand won't work with PDF.

    What I really want is to call the 'windows preview' that displays in explorer windows when the contents are picture and pdfs.

    Any ideas?

    Cheers - Chris
    If you merely want to view the files for checking purposes like that and wanted to keep it within access how about mounting a web browser control on the access form and controlling its Navigate2 property setting in much the same way as you would programatically pass a filepath to an image control you'd get your jpgs and pdfs then.

    Code:
     
    Me!WB.Navigate2 URL:="C:\myfolder\mypdffile.pdf"
    or
    Code:
     
    Me!WB.Navigate2 URL:="C:\myfolder\myjpgfile.jpg"
    If you wanted to shellexecute to the explorer and make it locate the file and select it then we could do that but you are giving your users direct file access then is that what you want? or is the web browser within access sufficient for viewing purposes for you

    Regards

    Jim :)

    Comment

    • ADezii
      Recognized Expert Expert
      • Apr 2006
      • 8834

      #3
      Originally posted by Jim Doherty
      If you merely want to view the files for checking purposes like that and wanted to keep it within access how about mounting a web browser control on the access form and controlling its Navigate2 property setting in much the same way as you would programatically pass a filepath to an image control you'd get your jpgs and pdfs then.

      Code:
       
      Me!WB.Navigate2 URL:="C:\myfolder\mypdffile.pdf"
      or
      Code:
       
      Me!WB.Navigate2 URL:="C:\myfolder\myjpgfile.jpg"
      If you wanted to shellexecute to the explorer and make it locate the file and select it then we could do that but you are giving your users direct file access then is that what you want? or is the web browser within access sufficient for viewing purposes for you

      Regards

      Jim :)
      If you are looking for the 'Explorer Type' Effect found in Windows Explorer, you would probably want to use the Microsoft TreeView and ListView ActiveX Controls. These Controls can be placed side by side together on a Form working in conjunction with one another to provide the desired effect. From a programming perspective, they can be difficult to work worth.

      Comment

      Working...