473,769 Members | 2,090 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Acrobat Reader Path function modification

I have modified my GetAcroPath function to:

Function GetAcroDir() As String
Const LatestVer = 7
Dim strAcroDir(Late stVer - 2) As String
Dim I As Integer

strAcroDir(1) = "C:\Program Files\Adobe\Acr obat 3.0\Reader\"
strAcroDir(2) = "C:\Program Files\Adobe\Acr obat 4.0\Reader\"
strAcroDir(3) = "C:\Program Files\Adobe\Acr obat 5.0\Reader\"
strAcroDir(4) = "C:\Program Files\Adobe\Acr obat 6.0\Reader\"
strAcroDir(5) = "C:\Program Files\Adobe\Acr obat 7.0\Reader\"
strLocatedAcroD ir = ""
For I = LatestVer - 2 To 1 Step -1
If Dir(strAcroDir( I), vbDirectory) <> "" Then
strLocatedAcroD ir = strAcroDir(I)
Exit For
End If
Next I
GetAcroDir = strLocatedAcroD ir
End Function

It allows for Acrobat Reader 7.0 plus allows me to check for the
existence of the directory and AcroRd32.exe separately. It still
assumes that Acrobat Reader is installed into it's default install
directory.

James A. Fortune

Nov 13 '05 #1
2 3666
Why do you need this? If you use the FollowHyperlink method, or the
ShellExecute API (see http://www.mvps.org/access/api/api0018.htm at "The
Access Web" for sample code), you'll automatically start with whichever
version is registered.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

<ji********@com pumarc.com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
I have modified my GetAcroPath function to:

Function GetAcroDir() As String
Const LatestVer = 7
Dim strAcroDir(Late stVer - 2) As String
Dim I As Integer

strAcroDir(1) = "C:\Program Files\Adobe\Acr obat 3.0\Reader\"
strAcroDir(2) = "C:\Program Files\Adobe\Acr obat 4.0\Reader\"
strAcroDir(3) = "C:\Program Files\Adobe\Acr obat 5.0\Reader\"
strAcroDir(4) = "C:\Program Files\Adobe\Acr obat 6.0\Reader\"
strAcroDir(5) = "C:\Program Files\Adobe\Acr obat 7.0\Reader\"
strLocatedAcroD ir = ""
For I = LatestVer - 2 To 1 Step -1
If Dir(strAcroDir( I), vbDirectory) <> "" Then
strLocatedAcroD ir = strAcroDir(I)
Exit For
End If
Next I
GetAcroDir = strLocatedAcroD ir
End Function

It allows for Acrobat Reader 7.0 plus allows me to check for the
existence of the directory and AcroRd32.exe separately. It still
assumes that Acrobat Reader is installed into it's default install
directory.

James A. Fortune

Nov 13 '05 #2
Douglas J. Steele wrote:
Why do you need this? If you use the FollowHyperlink method, or the
ShellExecute API (see http://www.mvps.org/access/api/api0018.htm at "The Access Web" for sample code), you'll automatically start with whichever version is registered.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


I do use the ShellExecute API in conjunction with it. I'd rather not
use fHandleFile. I have not considered the FollowHyperlink method yet.
I'd rather prevent errors than catch them. I think the FollowHyperlink
method will likely involve error catching also. Thanks for the
suggestions.

James A. Fortune

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
12589
by: Chris | last post by:
Hello all, I wish to automate printing of PDF documents in a C# application. Is there an Adobe .net object? I tried to create a reference to the COM Object Adobe Type Library, but I get error "Exception from HRESULT 0x80131019" Thanks Chris
6
5271
by: jdph40 | last post by:
We recently had to upgrade the computers in our company. Now our office's website on our company intranet no longer recognizes reports saved in snapshot format. We get an error message that the file we are downloading "cannot be opened by the default program. It is either corrupted or it has an incorrect file type." We had no problem until our upgrade, but our IT department says there's no fix. My question is concerning Adobe Acrobat....
1
2824
by: John F | last post by:
Hi, I would like to open a pdf file using acrobat reader form a vb.net application. Is there a vb method to do this or do I need to run a shell command? If I need to run a shell command how do determine the executable path for for acrobat reader?
3
6594
by: moroni | last post by:
No problem 2 set Access up to get address data from tblClients then to use a form as a letterhead and to keyboard in the letter content then save the letter to a tblCorrespondence Get a scanner. Scan in your letters received to pdf format.Now insert in a form Adobe Acrobat Control For ActiveX (the pdf.ocx). Set the src property of the ActiveX control to the path of the pdf file you want to view. No problem it all works fine. Now try to...
5
7462
by: CDMAPoster | last post by:
I have changed how I get the shell path for Acrobat Reader based on code posted by John deKrafft. Does anyone see any problems with this code running on various Windows OS's? '--Begin Module Code 'Support functions and constants for reading a string from the registry 'I have modified the code posted by John deKrafft slightly '---- Declare Function RegQueryValueEx Lib "advapi32.dll" Alias
0
1765
by: ridgedale | last post by:
Does anyone know how I can prevent the Acrobat Reader plugin from loading a pdf into the web browser? I need to force the user to download the pdf file and run the pdf using the full Adobe Acrobat Reader program. The code I'm using at present isn't working - any browser with the plugin loaded doesn't download the file it gets loaded into the browser window via the plugin: <?php $mytalk = $_GET; if($_GET == "1"): $mytalk = 'Talk 1';
10
10366
by: Mauro | last post by:
I'm trying to use the following VB function to transform a pdf document to a tiff one: http://forums.microsoft.com/msdn/showpost.aspx?postid=1665127&siteid=1&sb=0&d=1&at=7&ft=11&tf=0&pageid=1 Private Sub savePDFtoTIF(ByVal fullPathPDF As String, ByVal fullPathTIF As String) Dim PDFApp As Acrobat.AcroApp Dim PDDoc As Acrobat.CAcroPDDoc Dim AVDoc As Acrobat.CAcroAVDoc Dim JSObj As Object
0
1820
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgRGVzYXJyb2xsbw==?= | last post by:
Hi all people, everybody, We have multiple versions of Acrobat Reader from 5.x to 8.x, I want to create a method in C# or VB.NET to check to see if the registry key for the versions exists, and if so uninstall it, then install the latest
4
7398
Eleven
by: Eleven | last post by:
Hi, Got a problem detecting if Acrobat Reader is installed on a machine, would really appreciate your help. I've got a PDF Report that I export to a directory then open it with Acrobat Reader. I need to check if the PC has Acrobat Reader installed before I open it... I found this code but it's not working, i always get the messagebox even if the PC has the software installed. string RegPath =...
0
9579
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9422
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10208
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10038
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8867
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7404
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6662
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3952
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2812
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.