Solved

MS Access 2003 VBA Global Module Acrobat File Path Variable

Posted on 2013-05-15
2
615 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
2 Comments
 
LVL 3

Accepted Solution

by:
pjevin earned 500 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

MS Access 2003 or later To MySQL Migration Project Hello All, this is my second article in the category of MS-OFFICE Automation. In internet I am not able to find any comprehensive resource on the Migration of MS Access back-end to MySQL so I fin…
Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now