PDF Writer (Yes / No)

doran_doran

Registered User.
Local time
Today, 02:22
Joined
Aug 15, 2002
Messages
349
How can I detect if end user has PDF writer installed or not?

I can then hide or unhide my pdf button.
 
2 Methods:

Method 1: (preferred)
=================
Private Sub Form_Open(Cancel As Integer)
If QueryKey("Software\Adobe\Adobe Acrobat\5.0\InstallPath", "") = "" Then
Me.cmdSaveReportAsPDF.Enabled = False
Else
Me.cmdSaveReportAsPDF.Enabled = True
End If
End Sub
==================



Method 2: (NOT TESTED)
===================
Public Function CheckForWriter() As Boolean
dim strRequiredFile as string

'The file that is only present in the full version needs to go below:

strRequiredFile="C:\Program Files\Adove\PDFWriter\somefile.txt"

if len(dir(strRequiredFile))> 0 then

'The file exists

CheckForWriter=True

else

'The file doesn't exist

CheckForWriter=False

endif

end function
===================
 
doran_doran wrote:
Code:
If QueryKey("Software\Adobe\Adobe Acrobat\5.0\InstallPath", "") = "" Then

But this is only if 5.0 is installed. What if 4.0 or 6.0 are installed? I don't know of a way to check, but I wouldn't use a hard coded method such as this as things may change or not be applicable.
 
re...

If QueryKey("Software\Adobe\Adobe Acrobat\5.0\InstallPath", "") <> "" Or QueryKey("Software\Adobe\Acrobat Distiller\7.0\InstallPath", "") <> "" Then
Me.cmdSaveReportAsPDF.Visible = True
Else
Me.cmdSaveReportAsPDF.Visible = False
End If
 

Users who are viewing this thread

Back
Top Bottom