473,473 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

VBA can't find path opening PDF file...error...Need HELP!!!

5 New Member
This is the script that won't find any of my pdf files...error states file can't be found and I know the path is correct...If anyone can help...Please. I have tried many pdf docs with the same results. What am I doing wrong in my script?

Sub test()
Dim RetVal

RetVal = Shell("C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe C:\Documents and Settings\Owner\My Documents\dwdm.pdf, 1")
End Sub
Mar 26 '08 #1
4 1853
Sick0Fant
121 New Member
This is the script that won't find any of my pdf files...error states file can't be found and I know the path is correct...If anyone can help...Please. I have tried many pdf docs with the same results. What am I doing wrong in my script?

Sub test()
Dim RetVal

RetVal = Shell("C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe C:\Documents and Settings\Owner\My Documents\dwdm.pdf, 1")
End Sub
My best guess is that it's interpretting C:\Documents and Settings\Owner\My Documents\dwdm.pdf as 3 arguments because of the spaces. Try putting the path in quotes.
Mar 26 '08 #2
sclinkenbeard
5 New Member
Quotes generates a compile error.
Mar 26 '08 #3
Sick0Fant
121 New Member
Quotes generates a compile error.
You have to escape them, of course! Use "" to represent "
Mar 26 '08 #4
sclinkenbeard
5 New Member
Still comes up file can't be found. Thanks anyway. Not sure the issue but it appears no one else on this help page does either.
Mar 28 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: ADE | last post by:
Hi everyone well from my last post I found what I am looking for I have some code now that transfers files I have added a GUI to it and need some help with two things one my loadtemplate()...
5
by: Bernard | last post by:
Hi, I have a problem with a CGI script (Perl) on a Win2000 server. The script is for sending E-cards and was written by Jason Maloney:...
2
by: SoSaucily | last post by:
I am getting the 'partially uploaded file' error with uploads over about 4k-5k. $_FILE = 3. Rackin my brain on this one, any help appreciated. Php.ini - upload_max_filesize=2M -...
1
by: max | last post by:
RDBMS Version:: 10.1.0.3.0 Operating System and Version:: MAC OS X 10.4.2 Product Version:: ORACLE Db10g Version 10.1.0.3.0 OEM Console Operating System and Version:: I cannot install emca...
4
by: Brad Rogers | last post by:
Ive been struggling to get a command prompt for Visual Studio because DOS cannot accept long directory names for some reason, then I read about corvars.bat that will fix the environment variables,...
11
by: darrel | last post by:
I'm modyfying an image upload and resizing script that we've had laying around for a long while. I'm getting a NullReferenceException error (see full error at bottom) from this line: Dim g...
0
by: =?Utf-8?B?dGVzaHRyYWRlQGdtYWlsLmNvbQ==?= | last post by:
Hi All, I am still new to Webservices in .NET Basically, This is what I am trying to accomplish. My Client has given me the soft copy of the WSDL file and XSD Files and has asked me to create...
1
by: vikjohn | last post by:
I have a new perl script sent to me which is a revision of the one I am currently running. The permissions are the same on each, the paths are correct but I am getting the infamous : The specified...
2
by: aszush | last post by:
//Title: Programming Assignment 1 //Version: //Copyright: Copyright (c) 1999 //Author: Andrew //Company: //Description: Computes employee's weekly gross and net pay....
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.