Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

MS Access 2003 VBA Global Module Acrobat File Path Variable

Posted on 2013-05-15
2
Medium Priority
?
624 Views
Last Modified: 2013-05-15
Inherited an MS Access ADP App.

In a Global Module the path to Acrobat is found.

Problem is that all this is hard coded.

Originally all machines were WinXP SP3 and programs were installed on a D drive partition.

Now we're moving to Win 7 and some, but not all, have varying Acrobat paths.
Along with the 50 or 60 PC's that are still on XP

The VBA below has several paths...
I'd like one way to set this.

And I want the Acrobat variable to stay the same
Public Const Acrobat = "C:\Program Files\Adobe\Acrobat 11.0\Acrobat\Acrobat.exe /n /o"
'Public Const Acrobat = "C:\Program Files\Adobe\Acrobat 7.0\Acrobat\Acrobat.exe /n /o"
'Public Const Acrobat = "C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\Acrobat.exe /n /o"

Open in new window

0
Comment
Question by:lrbrister
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
pjevin earned 2000 total points
ID: 39168517
You could use Dir to see if the file exists in that location, if it doesn't it will just return nothing.

if (len(Dir("C:\Program Files\Adobe\Acrobat 11.0\Acrobat\Acrobat.exe")>0) then
Acrobat = "C:\Program Files\Adobe\Acrobat 11.0\Acrobat\Acrobat.exe /n /o"
else etc...

I doubt you want to go through the trouble of finding it.
0
 

Author Closing Comment

by:lrbrister
ID: 39168949
Thanks
0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question