Sometimes when sending files through email, you want to be able to simply right-click on the file and select “Send to mail recipient” form the context menu. If you are an Outlook 2003 or 2007 user, you might have noticed that when you do this Outlook generates a plain text email with your files conveniently attached. While a plain text email is nice, and probably the way all email should be, most of us have been spoiled with html email that allows fancy formatting and we want to keep this functionality when we right-click to send attachments. Not only do we want this formatting ability, but we also want our signatures to be automatically appended to the end of the mail.Below are a few steps to create a new “Send To Mail Recipient” context menu shortcut that address these issues:

  1. Right-Click the START button and select Explore
  2. From the windows that comes up, make sure to select the Send To folder from the folder list on the left. Vista Users: The Send To folder is located under: %APPDATA%\Microsoft\Windows\SendTo . Everything else should work the same.
  3. Right-Click anywhere in the white space to the right and select New, then Shortcut
  4. In the Type the location of the item: box type in the following lines based on the version of Outlook you are using:
    Outlook 2003: “C:Program FilesMicrosoft OfficeOFFICE11OUTLOOK.EXE” /c ipm.note
    Outlook 2007: “C:Program FilesMicrosoft OfficeOFFICE12OUTLOOK.EXE” /a
  5. In the Type a name for this shortcut: box type in: Outlook Mail Recipient
  6. Now when you right click on items to send as attachments you will have a new option. By selecting Outlook Mail Recipient you will get your new email in the default email format you have selected in Outlook and, if you have configured your signature for a new email, you will have it as well.

UPDATE: 02/10/2009
It look like this method won’t work when selecting multiple files. For a possible workaround try the following:

  1. Create a file sendto.js with the following code and save it somewhere on your system. For this example the file is saved to c:\sendto.js. You can download my copy here: sendtojs
    try
    {
    	var args = WScript.Arguments;
    	var outlookApp = new ActiveXObject("Outlook.Application");
    	var nameSpace = outlookApp.getNameSpace("MAPI");
    	var mailFolder = nameSpace.getDefaultFolder(6);
    	var mailItem = mailFolder.Items.add('IPM.Note.FormA');
    
    	with(mailItem)
    	{
    		Subject="Sending Files";
    
    		for (var i = 0; i < args.length; i++)
    		{
    			Attachments.Add(args(i));
    		}
    
    		Display(0);
    	}
    }
    catch(err){
    
    }
    finally
    {
    	outlookApp = null;
    }
  2. Follow the steps in the tutorial above, but in step 4 type this in the box instead:
    %windir%\system32\wscript.exe “C:\sendto.js”

    Note: Use the “Change Icon” button on the same screen to manually change the icon and use the icons in the Outlook.exe file, otherwise you will get the wscript.exe icon.

    Note: This is very crude code and hasn’t been tested much.

    Vista: To get to the Send To folder, you’ll need to open up an Explorer window, and then paste the following into the address bar: %APPDATA%\Microsoft\Windows\SendTo

4 Comments

  1. Mathias Amsellem says:

    This works if I want to send one file, but when I try to send multiple files Outlook give me an error message "The command line argument is not valid. Verify the switch you are using." Do you know why this is happening, and more importantly, do you know how to solve this problem?

  2. deciacco says:

    Mathias: I get the same error as you when I try to send multiple files. I don't think Outlook parameters allow for multiple files to be sent, but I may have a workaround. Please visit my blog again as I have updated the post to include this new method. Give it a try and let me know how it goes.

    Thanks!

  3. Dave Bridger says:

    Hi Deciacco,

    You workaround works fine for two files, but not 3 or 4.

    Unless it's just my system not working very well, it just does nothing when I select more than 2 files.

    Thanks

  4. deciacco says:

    Dave,
    I can't seem to replicate the same problem on my end. I'm on XP Pro SP3, it may make a diff. if you are on Vista, but I don't have a Vista box to test on. Either way, try changing the catch block to show a message box if there is an error. It may help determine what is going on. Replace "catch(err){ }" with the code below and see if it helps.

    catch(err)
    {
    WScript.Echo("Error occurred\nCode: " + hex(err.number) +
    "Description: " + err.description);
    }

    Like I said, I've tried with many more files than just two and it works for me. Let me know if you get an error message and we can go from there.

    Thanks for your input!

Leave a Reply