Connecting Tech Pros Worldwide Forums | Help | Site Map

The command line argument is not valid

Newbie
 
Join Date: Feb 2007
Posts: 5
#1: Jun 21 '09
Hello,
Using Microsoft office 2007.
I try to open a pdf file from Start->Run.
I typed the following command on 2 comps:
"c:\program files\office2007\office12\outlook.exe" "c:\map-hit.pdf" %f
(just an example, no matter what file to open and I change of course the path accordingily).
On one it works but on the other it returns an error "Cannot start Microsoft Office Outlook. The command line argument is not valid. Verify the switch you are using."

How can I make it work on the second computer?

Please Advise,

ambrnewlearner's Avatar
Expert
 
Join Date: Jan 2008
Location: A city in my country ;)
Posts: 855
#2: Jun 21 '09

re: The command line argument is not valid


Hello,

Your post is confusing (or atleast it appears so). Can you really open a PDF using Outlook? I have heard that there is a "Save as PDF" option in every application included in MS Office 2007 but never heard that one could pass a PDF file as a command line arguement to outlook and then open it? So, can you post your question more clearly?

OR maybe, I am mistaken with my assumption with Outlook.

AmbrNewlearner
Newbie
 
Join Date: Feb 2007
Posts: 5
#3: Jun 21 '09

re: The command line argument is not valid


I want to attach a file to outlook from command line.
This command (even without the %f parameter opens a message with the file mentioned attached only on my computer but on other machines - not).
I don't know what is the difference why does it work only on my machine?
ambrnewlearner's Avatar
Expert
 
Join Date: Jan 2008
Location: A city in my country ;)
Posts: 855
#4: Jun 21 '09

re: The command line argument is not valid


Hello,
Quote:

Originally Posted by arielkanat View Post

I want to attach a file to outlook from command line.
This command (even without the %f parameter opens a message with the file mentioned attached only on my computer but on other machines - not).
I don't know what is the difference why does it work only on my machine?

Well, in your original post, you mentioned that you are "trying to open a pdf file" and I misinterpreted you. Now that you mention that you want to attach a pdf file, I suppose some other expert may help you (as I don't use Outlook). So, I will just suggest you to wait for reply from some other bytes Windows expert who has got some solution to your problem.

AmbrNewlearner
Reply


Similar Microsoft Windows / Vista / XP / ME / 95 & 98 bytes