Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Send mail with attachment

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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default 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






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Send mail with attachment

Jos,

afaik Microsost has disabled the functionality
of the attachment part of url handling for security reasons.

keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Jos Vens" wrote:


Jos Vens wrote
Hi,

I found a way with outlook to send emails with attachments.
However,



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








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default Send mail with attachment

Thanks,

this is maybe true, because a time ago, I tried this function and it worked,
but I always update my windows version, and I suppose that this will be the
reason why it doesn't work anymore. So my question stays open: does anyone
know a method to send a mail with an attachment which is independent from a
email program, like "mailto" did?

What would I like to get? The user of my excel-program must send a workbook,
but it's fairly big, so it's better to compress it first, then send it (as a
zip-file).

Can anyone help?

Jos Vens



"keepitcool" schreef in bericht
...
Jos,

afaik Microsost has disabled the functionality
of the attachment part of url handling for security reasons.

keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Jos Vens" wrote:


Jos Vens wrote
Hi,

I found a way with outlook to send emails with attachments.
However,



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










Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
send to mail recipient as attachment not sending [email protected] Excel Discussion (Misc queries) 6 May 4th 07 08:42 PM
Excel Send to Mail Recipient (as Attachment) Dave Excel Discussion (Misc queries) 2 February 23rd 06 09:10 PM
send to mail recipient as attachment - no worky... Scott McDonald Excel Discussion (Misc queries) 0 April 23rd 05 01:36 AM
Send to Mail Recipient (as attachment) Lags JGas Excel Discussion (Misc queries) 0 February 9th 05 06:17 PM
Cannot "Send to -> mail recipient (as attachment)" Jack Excel Discussion (Misc queries) 2 December 18th 04 12:04 PM


All times are GMT +1. The time now is 12:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"