PDA

View Full Version : File.OpenEmail and attachments


pjhiggins
04-29-2004, 09:07 AM
I understand that File.OpenEmail will open the system's default mail app and insert the address provided.

Is there a clever way to also automatically include an attachment also?

Specifically, I'm working with Outlook 2002+ and I'd like to have it pop up a new message, already addressed, and with my file attached all ready for the send button :)

*curse spammers!
My too cool version of the same thing using Blat fails too often because you can't use port 25 without a blood sample and a note from your mother any more...

zzzs
04-30-2004, 12:56 PM
Hi,
There is no build in function to do that, so I tried to open Outlook 2002 from the command line and send argument to it with attachment.
I didn't test it on Outlook 2002 but it should work fine.

"C:\Program Files\Microsoft Office\Office11\Outlook.exe." /a c:\test\1.jpg
now you can run it from Autoplay and send the path as argument.

You can read more about Outlook Switches (http://support.microsoft.com/default.aspx?scid=kb;en-us;296192)


David.

zzzs
04-30-2004, 01:33 PM
put it in your button,

Shell.Execute("Outlook.exe", "open", "/a c:\\test\\1.jpg", "C:\\Program Files\\Microsoft Office\\Office11\\", SW_SHOWNORMAL);

pjhiggins
04-30-2004, 02:47 PM
Cool :)

I'll look into this.

Thanks a bunch!