PDF thumbnails and preview in Microsoft Access

I have a Microsoft Access database and some PDF files. Right now, the Access database is just showing a link to a PDF file with a .pdf icon.

What I want is to view thumbnails (for example, in Windows Explorer) in PDF format.

Secondly, right now when I click the PDF link, it opens the PDF file from the outside in Adobe Reader. How can I open it in preview mode in Access?

+4
source share
2 answers

All this will require the use of the built-in ActiveX control in your access application. There are many, some are free and some are not, depending on what you plan to do. To use "view-only", I think you should find something free. We used foxit reader and more complex amyuni in our applications with some success.

The principle is as follows:

  • You must add the appropriate activeX file to the available links of your application (VBA screen, tools, select)
  • Then you can insert the appropriate control into the form, in general with some “empty” menus or controls.
  • You can use these menus or controls to launch the various methods available for the PDF control (select file, next / previous page, zoom in / out, etc.).
  • Depending on the vendor, some of these methods may be directly integrated into the ActiveX control.
  • I am sure you can google and find some examples of such work with VBA or even VB

If you distribute your access application, you will have to distribute the active file with it. In most cases (if not all), the distribution of the activeX file is free.

+3
source

As a normal rule, I do not like to implement things that use external software inside the form.

However, Access 2010 has a new web control. You place this control on the form and specify the URL of the path name for the pdf (or image, etc.), after which it will display and display this PDF inside the form. This works quite well as long as any PDF viewer is installed.

I caution these approaches because upgrades to a PDF viewer or even users with a different PDF viewer can often cause problems and cost you dollars. As already noted, I believe that using the new web browser control is risky, but at least much less risk than most methods. Since the new browser control is native to Access 2010, you can try this idea pretty hard in the production code, but I still try to stick with a simple click to see what any Windows software that the user runs on this computer launches.

+1
source

Source: https://habr.com/ru/post/1397122/


All Articles