Send mail with attachment
Hi Chrissy,
of course, my problem is not which email program the receiver uses, but I'm
concerned about the email program the sender uses (see code: mailto is
program-independant). I have a program where the user clicks on a button
and then a mail should be sent to a pre-defined address with an attachment
(and this is not an excel document, otherwise I could use the
sendmail-command which is also program-independent).
Thanks anyway
Jos Vens
"Chrissy" schreef in bericht
...
If you mail an attachment from one mail client then it does not
matter if the receiver uses a different mail client. The mail
you send should be able to be read from their mail client.
Chrissy.
Jos Vens wrote
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
|