Command Line Switch - Attachment

M

mattshep

I'm trying to run this switch in a batch file, inserting an address and
attaching a document.

"c:\program files\microsoft office\office11\outlook.exe" /c imp.note /m
(e-mail address removed) /a "h:\document.doc"

Leaving the /a it inserts the address fine, but I cant seem to get the
attachement working.
error = "The command line argument in not valid. verify the switch you
are using"
Running XP Pro and Office 2003 SP1

prob being stupid about something, any help would be appreciated!
 
B

Brian Tillman

mattshep said:
I'm trying to run this switch in a batch file, inserting an address
and attaching a document.

"c:\program files\microsoft office\office11\outlook.exe" /c imp.note
/m (e-mail address removed) /a "h:\document.doc"

Leaving the /a it inserts the address fine, but I cant seem to get the
attachement working.
error = "The command line argument in not valid. verify the switch you
are using"

I believe the /m and /a switches are mutually exclusive. I just created a
shortcut whose target was

"%ProgramFiles%\Microsoft Office\Office11\Outlook.exe" /m
myname@myaddress?subject=Check%20This%20Out /c IPM.Note "%UserProfile%\My
Documents\Test.txt"

(all one line, of course.) I did not include the /a and I got an Outlook
compose window with my address as the recipient, "Check This Out" as the
subject, and a "Text.txt" attachment.
I tried putting it in a batch file, though, and it didn't work. I got an
"object could not be found" error.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top