473,396 Members | 2,085 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,396 software developers and data experts.

"Shell"ing to Adobe update question

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 code to get Abobe to
open is working really well, however the referenced file I need is not
being opened. I've tried the path that I've got in the text box via
the cmd prompt and copying the path in Windows Exp and the path does
work. Any suggestions as to why the actual file is not being opened
would be appreciated.

The code I've got to work so far is ....

Private Sub Full_pdf_form_Click()

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.0\Reader\AcroRd32.exe" & strFilePath
'set the file path for the pdf file (as shown in the textbox name)
strFilePath = "Me.[NCF form pdf].Value" <== this bit's not
working though ;-)

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

End Sub

Thanx in advance,
Stinky Pete ;-)

Aug 31 '06 #1
1 1818
Two things that I see:
strAcrobatPath = "C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe" &
strFilePath
The value in strFilePath has not been set yet. Though in your shell command
you are adding strFilePath again, so I guess this line should be:
strAcrobatPath = "C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe"

strFilePath = "Me.[NCF form pdf].Value"
There should not be quotes here. Assuming NCF Form pdf if the name of your
text box, it should be
strFilePath = Me.[NCF form pdf].Value

Hope this helps
Vayse
"Stinky Pete" <Pe**********@symbionhealth.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
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 code to get Abobe to
open is working really well, however the referenced file I need is not
being opened. I've tried the path that I've got in the text box via
the cmd prompt and copying the path in Windows Exp and the path does
work. Any suggestions as to why the actual file is not being opened
would be appreciated.

The code I've got to work so far is ....

Private Sub Full_pdf_form_Click()

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.0\Reader\AcroRd32.exe" & strFilePath
'set the file path for the pdf file (as shown in the textbox name)
strFilePath = "Me.[NCF form pdf].Value" <== this bit's not
working though ;-)

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

End Sub

Thanx in advance,
Stinky Pete ;-)

Aug 31 '06 #2

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

Similar topics

5
by: Bill | last post by:
I used to be able to run the following ASP code on our corp machine (W2K Server Edition and IIS-5) and successfully send a net-msg to anyone on our intranet. Last week it stopped working... and...
2
by: jwalton | last post by:
I have a web site (for a client) where I am now using a considerable number of XML files. Previously the files were updated off-line, and FTPd to make live. I now need to allow "user editors" to...
3
by: MLH | last post by:
Where would I go to find a list of the possible return values for X and their implication when launching.. X=Shell("C:\Windows\wordpad.exe c:\cr\docs\packets\ntrolttr.rtf", 1) ???
4
by: N. Graves | last post by:
First... thanks for taking time to read my quest. I have Access database that I have created that once it has been deployed I will not know who has it or who is using it. This is my idea but...
9
by: Amjad | last post by:
I'm trying to create a folder, append text file to another, and delete files using the "Shell" command. But I always get the error "File Not Found". How do I use DOS commands from Visual Basic?...
1
by: Ennio-Sr | last post by:
Hi all! I'm writing a script that presents the user with a numbered lines menu, each line corresponding to a <case n> which executes a psql command. As the psql-commands are very similar to each...
4
by: Ying Lu | last post by:
Hello all, Is it possible that we setup the password in the pg_dump command line instead of let users input it through prompt command. E.g., pg_dump test -c -d --host=localhost -U testUser1...
1
by: key9 | last post by:
Hi all I have some data to process, whith complex mechanism,I put these process mechanism as plugins. and design lots of classes to abstract data themselves. but the question is how to drive...
4
by: DonD | last post by:
I have a site that uses a bit of flash and I include a link for visitors to get flash if they don't have it. Unfortunately, the XHTML validator complains about the "get flash" url, even when using...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.