• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 331
  • Last Modified:

Outlook > Send to

Hi

If i click on a file in explorer and go down to 'Send To > Mail Recipient' outlook will create a new email with this message:

It adds the files as an attachment and then this text as the body of the email:

 
The message is ready to be sent with the following file or link attachments:

20060517-1504 Letter.PDF


Note: To protect against computer viruses, e-mail programs may prevent sending or receiving certain types of file attachments.  Check your e-mail security settings to determine how attachments are handled.




Is there a way to stop it adding all this junk and having only say.. a signature at the bottom, ready for the user to type a message?

All suggestions appreciated!
0
MarkMichael
Asked:
MarkMichael
  • 5
  • 3
1 Solution
 
David LeeCommented:
I don't know of any way to alter that behavior, but I do know a way to get around it.  That is to create your own "Send To" link.  It's easier than it sounds and the benefit is that it gives you complete control over how Outlook behaves during this operation.  All that's required to create a "Send To" link is writing a script that you then place in your Send To folder.  Here's a sample script that emulates the behavior of the default Mail Recipient link.

Dim objArgs, olkApp, olkNS, olkMessage, strFilenames
Set objArgs = WScript.Arguments
If objArgs.Count > 0 Then
    Set olkApp = CreateObject("Outlook.Application")
    Set olkNS = olkApp.GetNamespace("MAPI")
    'Change the name of your profile on the next line if it's not Outlook
    olkNS.Logon "Outlook"
    Set olkMessage = olkApp.CreateItem(0)
    olkMessage.BodyFormat = 2
    For I = 0 to objArgs.Count - 1
        olkMessage.Attachments.Add objArgs(I)
        strFilenames = strFilenames & olkMessage.Attachments.Item(I+1).FileName & ", "
    Next
    If Right(strFilenames,2) = ", " Then
        strFilenames = Mid(strFilenames,1,Len(strFilenames) - 2)
    End If
    olkMessage.Subject = "Emailing: " & strFilenames
    olkMessage.Display
    olkMessage.HTMLBody = "Your files are attached and ready to send with this message." & olkMessage.HTMLBody
End If
Set objArgs = Nothing
Set olNS = Nothing
Set olApp = Nothing

The nice aspect of this approach is that I can change the script to do anything I want.  I can change the text in the message, add a signature, pretty much anything I can think of.  I practice I use two scripts, one for internal staff and another for external staff.  The script for internal staff creates links to the files instead of attaching them.  That helps keep the mail system clean.  The script for external staff actually attaches the files.  

To use the script above, copy the code and paste it into Notepad.  Now, save it in your Send To folder with a .vbs extension.  
0
 
MarkMichaelAuthor Commented:
I have tested this, but when I click on a file and right click 'SendToTest.vbs' nothing happens. Am i doing somethign wrong?
0
 
David LeeCommented:
What version of Outlook do you have?  Is your Outlook profile named "Outlook"?  You can check that by going to Control Panel, clicking the Mail icon, then clicking Show Profiles.  If your profile is not named Outlook, then edit the script and change the profile name there to match your profile name.  I included a comment line in the script showing where that change needs to take place at.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
MarkMichaelAuthor Commented:
I am using Outlook 2007 actually, perhaps this is my problem. My outlook mail profile is also named Outlook. Any other possibilities besides it being 2007 incompatibility?
0
 
David LeeCommented:
I don't know if Outlook 2007 is the problem or not.  I'm going to test that right now.  In the meantime, what version of Windows are you on?  
0
 
David LeeCommented:
I just tested with Outlook 2007 running on Windows XP and the script worked perfectly.
0
 
MarkMichaelAuthor Commented:
I am running XP Pro SP2, I have added the file to the folder: C:\Documents and Settings\User\SendTo

I have just realised my problem, when doing the usual 'copy and paste' routine, always remember to paste!
;)
0
 
David LeeCommented:
That does help.  Glad you got it working.  Cheers!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now