By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,316 Members | 2,317 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,316 IT Pros & Developers. It's quick & easy.

App Path

P: n/a

This seems like it should be easy, but I can not figure it out. I have
a file that I would like to open but I must open Acrobat first. Here is
what I have tried:
Call Shell(App.Path & "\AcroRd32.exe C:\Program Files\DAS\DAS Data
Questionnaire.pdf")
This will be used on many computers where the file is always in the same
place and the Acrobat will be in many places. Please let me know any
way I can do this or what I may be doing wrong. Thank you for all of
your help

Coy
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Coy Howe wrote:
This seems like it should be easy, but I can not figure it out. I have
a file that I would like to open but I must open Acrobat first. Here is
what I have tried:
Call Shell(App.Path & "\AcroRd32.exe C:\Program Files\DAS\DAS Data
Questionnaire.pdf")
This will be used on many computers where the file is always in the same
place and the Acrobat will be in many places. Please let me know any
way I can do this or what I may be doing wrong. Thank you for all of
your help

Coy
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


If Acrobat is a registered program (you can click on a PDF file and
Acrobat opens) then check out http://www.mvps.org/access/api/api0018.htm.
Nov 13 '05 #2

P: n/a
Coy Howe wrote:
This seems like it should be easy, but I can not figure it out. I have
a file that I would like to open but I must open Acrobat first. Here is
what I have tried:
Call Shell(App.Path & "\AcroRd32.exe C:\Program Files\DAS\DAS Data
Questionnaire.pdf")
This will be used on many computers where the file is always in the same
place and the Acrobat will be in many places. Please let me know any
way I can do this or what I may be doing wrong. Thank you for all of
your help

Coy
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


One thing that will help is to use

CurrentProject.Path

(in Access 2000 and newer) instead of App.Path (which is a VB method of
no use in Access) to get the "current directory".

Another potential gotcha is the spaces in the file name of the .pdf file
- you'll probably want to quote that value.

--
'---------------
'John Mishefske
'---------------
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.