View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jos Vens Jos Vens is offline
external usenet poster
 
Posts: 52
Default Send mail with attachment

Hi,

I found a way with outlook to send emails with attachments. However, I'm
not sure that my customer has outlook installed, so I looked for an
independent code to sent a mail and I found a good solution

here's my code

Sub SendIt()

vRecipient = "
vSubject = "Fine"
vBody = "The mail is send"
vAttachment = "C:\Test.xls"

vMail = "mailto:" & vRecipient _
& "?subject=" & vSubject _
& "&body=" & vBody _
& "&attachment=" & vAttachment

ThisWorkbook.FollowHyperlink vMail

End Sub

Everything works fine and is mail-client indepent (it takes the default
email program) but my attachment is not added to the mail. Who can tell me
why?

Thanks
Jos Vens