473,382 Members | 1,387 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Shell command for Adobe 7

HI,

I've been trolling through the archives of this list in order to better
understand how to get Access to open Adobe Acrobat and a specific pdf
file. Having never done this before, I've got a tad confused and am
not sure if this code is for A97 or will work with A02. Anyway, I'm
trying to use this code for a command button to open up a specific pdf
file on our intranet. It keeps on getting hung on the Shell line.
Another time it got hung on the fact the path to Adobe was wrong.

Any advice and suggestions are welcome.

Stinky Pete ;-)

Private Sub Full_pdf_form_Click()

Me.axcAcrobat.src = Me![Full pdf form]

Dim strFilePath As String
Dim strAcrobatPath As String

'set the file path for acrobat
strAcrobatPath = "C:\Program
Files\Adobe\Acrobat_7.0\Reader\AcroRd32.exe"
'set the file path for the pdf file (as shown in the textbox name)
strFilePath = "Me.[NCF form pdf].Value"

'open the pdf file
Shell (strAcrobatPath & " " & strFilePath)

End Sub

Aug 30 '06 #1
6 2364
Hi stinky Pete
>Stinky Pete ;-)
Have you tried application.followhyperlink
>
Private Sub Full_pdf_form_Click()
Dim strFilePath As String
strFilePath = "\\Path to .pdf"
Application.FollowHyperlink StrFilePath
>
End Sub
Regan

--
Message posted via http://www.accessmonster.com

Aug 30 '06 #2
Hi Regan,

No, I have not tried it as I did not even know it existed ;-) I'll
give it a go and for what may be a silly question, do I need to make
the actual file path in the text box a hyperlink or does this function
"force" the file path to be one anyway? As I metnioned in my original
post, this is new ground for me. Thanx for the suggestion.

Stinky Pete ;-)

Regan via AccessMonster.com wrote:
Hi stinky Pete
Stinky Pete ;-)

Have you tried application.followhyperlink

Private Sub Full_pdf_form_Click()
Dim strFilePath As String
strFilePath = "\\Path to .pdf"
Application.FollowHyperlink StrFilePath

End Sub

Regan

--
Message posted via http://www.accessmonster.com
Aug 30 '06 #3
Hi Regan,

No, I have not tried it as I did not even know it existed ;-) I'll
give it a go and for what may be a silly question, do I need to make
the actual file path in the text box a hyperlink or does this function
"force" the file path to be one anyway? As I metnioned in my original
post, this is new ground for me. Thanx for the suggestion.

Stinky Pete ;-)

Regan via AccessMonster.com wrote:
Hi stinky Pete
Stinky Pete ;-)

Have you tried application.followhyperlink

Private Sub Full_pdf_form_Click()
Dim strFilePath As String
strFilePath = "\\Path to .pdf"
Application.FollowHyperlink StrFilePath

End Sub

Regan

--
Message posted via http://www.accessmonster.com
Aug 30 '06 #4
Hi
>No, I have not tried it as I did not even know it existed ;-) I'll
give it a go and for what may be a silly question, do I need to make
the actual file path in the text box a hyperlink or does this function
"force" the file path to be one anyway? As I metnioned in my original
post, this is new ground for me. Thanx for the suggestion.
No you don't have to make the file path a hyperlink

Sweet As Alkatraz
>Regan
--
Message posted via http://www.accessmonster.com

Aug 30 '06 #5
Hey,

Well at least now I can open adobe ;-) I'll keep playing to see what
else I can learn. I know I am close ;-)

Stinky Pete ;-)

Regan via AccessMonster.com wrote:
Hi
No, I have not tried it as I did not even know it existed ;-) I'll
give it a go and for what may be a silly question, do I need to make
the actual file path in the text box a hyperlink or does this function
"force" the file path to be one anyway? As I metnioned in my original
post, this is new ground for me. Thanx for the suggestion.

No you don't have to make the file path a hyperlink

Sweet As Alkatraz
Regan

--
Message posted via http://www.accessmonster.com
Aug 30 '06 #6
Stinky Pete wrote:
>Hey,

Well at least now I can open adobe ;-) I'll keep playing to see what
else I can learn. I know I am close ;-)
Here is an example. it might be clearer

Text box containtion path to * pdf
Textbox = \\computername\wherefileis\Mypdf File.pdf <--text fields
Textbox = C:\mydocuments\MyPdfFileIWantToOpen.pdf
Dim strfile As String

strfile = me!textbox

Application.followhyperlink strfile
This can also be used to open *.doc and *.xls and MORE

regan

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200608/1

Aug 30 '06 #7

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

Similar topics

8
by: Siemel Naran | last post by:
Hi. I'm writing a command shell that reads commands from standard input. At this point I have the command in a std::string. Now I want to execute this command in the shell. From the Borland...
8
by: zhiwei wang | last post by:
I remember that there is a function that could invoke shell command such as "rm" "cp", directly in .c file. But I could not recall its name, and I googled with nothing meaningful. I vaguely...
3
by: Tom McLaughlin | last post by:
I need to start Acrobat reader and load the file guide.pdf The following code will start the program but how do I get it to load my document guide.pdf? Shell("C:\Program Files\Adobe\Acrobat...
2
by: micahstrasser | last post by:
I have been trying for days to send a command to the command prompt through the shell() function in vb.net. For some reason it is not working. Here is the code: Private Sub Button1_Click(ByVal...
2
by: Glenn Venzke | last post by:
I'm trying to print an Adobe forms file (.fdf) using system.diagnostics.process in a windows service. The problem is, IE is the program that launches that file type & Verb = "Print" doesn't work in...
1
by: Stinky Pete | last post by:
Hi, With thanx to the group and suggestions to review other news sites, I've got some code that allows me to open Adobe from Access. As I am new at this, I still need some help though. The...
5
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...
25
by: dennijr | last post by:
ok, shell always used to be easy for me, now its starting to get annoying cause i dont know wats wrong heres the simplist code possible: Private Sub IExplorer_Click() a = Shell("C:\Program...
7
by: Samuel A. Falvo II | last post by:
I have a shell script script.sh that launches a Java process in the background using the &-operator, like so: #!/bin/bash java ... arguments here ... & In my Python code, I want to invoke...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.