By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,639 Members | 2,262 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,639 IT Pros & Developers. It's quick & easy.

Preview JPEG & PDF withing Access Forms

P: 11
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
Sep 13 '07 #1
Share this Question
Share on Google+
2 Replies


Jim Doherty
Expert 100+
P: 897
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.

Expand|Select|Wrap|Line Numbers
  1.  
  2. Me!WB.Navigate2 URL:="C:\myfolder\mypdffile.pdf"
  3.  
or
Expand|Select|Wrap|Line Numbers
  1.  
  2. Me!WB.Navigate2 URL:="C:\myfolder\myjpgfile.jpg"
  3.  
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 :)
Nov 2 '07 #2

ADezii
Expert 5K+
P: 8,638
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.

Expand|Select|Wrap|Line Numbers
  1.  
  2. Me!WB.Navigate2 URL:="C:\myfolder\mypdffile.pdf"
  3.  
or
Expand|Select|Wrap|Line Numbers
  1.  
  2. Me!WB.Navigate2 URL:="C:\myfolder\myjpgfile.jpg"
  3.  
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.
Nov 3 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.