Is Save As PDF Add-in installed

D

dale fye

Does anyone know if there is a way to determine whether the SaveAsPDF Add-in
is installed on a users computer (via code).

I have Save As PDF and Send as PDF options in my reports shortcut menus for
an Access 2007 database, but several of my users are getting the 2282 error
if they don't have that add-in installed.

I would like to just disable or hide these options if the user does not have
the add-in installed.
 
P

Paul Shapiro

One way would be to try accessing that option while trapping the error. If
the error occurs, it's not installed.
 
D

Dale Fye

Paul,

Thanks, Paul, but I was looking for something a little more elegant, and
maybe less time consuming.

Dale
 
P

Paul Shapiro

There's nothing inelegant about that approach, and it's only a few lines of
code. You can do the test when deciding to display or disable a menu option,
rather than waiting until the user makes the choice, present a friendly
notification if you want to suggest the user install the feature, etc. I
didn't mean you should wait until the user tries to access that option. Your
code can do that test as part of application initialization, report open
event, set a static flag so you only have to test once, etc.
 
D

Dirk Goldgar

dale fye said:
Does anyone know if there is a way to determine whether the SaveAsPDF
Add-in
is installed on a users computer (via code).

I have Save As PDF and Send as PDF options in my reports shortcut menus
for
an Access 2007 database, but several of my users are getting the 2282
error
if they don't have that add-in installed.

I would like to just disable or hide these options if the user does not
have
the add-in installed.


Dale, there's probably a registry key that you can check, or a DLL that you
can look for, but I don't know what it might be. One rather cumbersome way
to find out would be to use VirtualPC to create a system image without the
SaveAsPDF add-in installed, and export the registry to a file. Maybe also
capture directory listings of the Microsoft Office folders. Then install
the add-in and afterward export the registry to another file (and capture
directory listings again). Then use a diff tool to look for differences in
the files you captured.

It sounds like a lot of work, but it seems to me it would probably give you
something to go on. Best, of course, is if someone here already knows the
answer.
 
D

Dale Fye

Paul,

Good idea. Only took a couple of lines of code, and appears to be working
as desired.
 
T

Tony Toews [MVP]

dale fye said:
Does anyone know if there is a way to determine whether the SaveAsPDF Add-in
is installed on a users computer (via code).

I have Save As PDF and Send as PDF options in my reports shortcut menus for
an Access 2007 database, but several of my users are getting the 2282 error
if they don't have that add-in installed.

Alternatively consider using the Lebans solution for creating PDFs.

Mind you that won't handle the Send as PDF option. You'd need to try
MAPI if that handles attachments properly or Outlook if that works for
you. I haven't worked with the Send as PDF option so I don't know
how it works.

A2000ReportToPDF is an Access 2000 database containing a function to
convert Reports and Snapshot files to PDF documents. No PDF Printer
driver is required.
http://www.lebans.com/reporttopdf.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top