Sending mails from excel macro

 

Hi,

 I'm writing an excel macro to send email from Outlook. Can I set the "From" id from which the email is sent?

I tried using the following code. but it dosent work:

 

 With OutMail
        .SentOnBehalfOfName = email@email.com
        .From = email@email.com
End With 

Regards,

Nitin 

 
nbhatia4u:

Hi,

 I'm writing an excel macro to send email from Outlook. Can I set the "From" id from which the email is sent?

I tried using the following code. but it dosent work:

This forum is about mql4 on MT4, not about Excel,  find an Excel Forum and ask there.