Group:  Microsoft Access ยป microsoft.public.access.interopoledde
Thread: Lookp Acrobat install location in code and assign to a variable

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Lookp Acrobat install location in code and assign to a variable
"Ken" <kolson1961[ at ]earthlink.net> 17.09.2006 06:14:32

In the code below I have hard coded the path to where Acrobat is installed.
What I really need is to look up the install path via code and write it to a
variable so that the code can be computer independent.

For instance, this is where the patch is stored in the registry.
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Acrobat.exe

Here is the code I'm using now that I need to modify.

***************************
Dim strFilePath As String
Dim strAcrobatPath As String

'set the file path for acrobat (please double check this)
strAcrobatPath = "C:\Program Files\Adobe\Acrobat 7\Acrobat\Acrobat.exe"

'set the file path for the pdf file (as shown in the textbox NomeFile)
'strFilePath = Me.NomeFile.Value
strFilePath = DLookup("[ImagesPath]", "tblOwnerInfo") & "\" &
Forms![frmDataEntry]![sbfDocuments]![DocID] & ".pdf"

'open the pdf file
Shell strAcrobatPath & " " & strFilePath
***************************

Thank you.

Ken


Re: Lookp Acrobat install location in code and assign to a variable
John Nurick <j.mapSoN.nurick[ at ]dial.pipex.com> 19.09.2006 20:50:06
Ignore the message advising an upgrade to "Access 2004". At best it is
spam, and it could be more dangerous.

On Sat, 16 Sep 2006 23:14:32 -0700, "Ken" <kolson1961[ at ]earthlink.net>
wrote:

[Quoted Text]
>
>In the code below I have hard coded the path to where Acrobat is installed.
>What I really need is to look up the install path via code and write it to a
>variable so that the code can be computer independent.
>
>For instance, this is where the patch is stored in the registry.
>HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Acrobat.exe
>
>Here is the code I'm using now that I need to modify.
>
>***************************
> Dim strFilePath As String
> Dim strAcrobatPath As String
>
> 'set the file path for acrobat (please double check this)
> strAcrobatPath = "C:\Program Files\Adobe\Acrobat 7\Acrobat\Acrobat.exe"
>
> 'set the file path for the pdf file (as shown in the textbox NomeFile)
> 'strFilePath = Me.NomeFile.Value
> strFilePath = DLookup("[ImagesPath]", "tblOwnerInfo") & "\" &
>Forms![frmDataEntry]![sbfDocuments]![DocID] & ".pdf"
>
> 'open the pdf file
> Shell strAcrobatPath & " " & strFilePath
>***************************
>
>Thank you.
>
>Ken
>

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net