ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   send email in VBA (https://www.excelbanter.com/excel-programming/333461-send-email-vba.html)

lcoreyl[_17_]

send email in VBA
 

I am trying to send an email from within Excel VBA. I am currently
using a Shell command because I just want the email to open so the user
has the option to click send or do whatever else. I have 2 questions:

1.) If I use the shell command method, is there a way to check and see
if the email message is ready? Does it have a ready state to poll?

2.)If I use the .sendmail method, is there a way to have the email
brought up in a window?


--
lcoreyl
------------------------------------------------------------------------
lcoreyl's Profile: http://www.excelforum.com/member.php...fo&userid=2042
View this thread: http://www.excelforum.com/showthread...hreadid=384051


Ron de Bruin

send email in VBA
 
Hi lcoreyl

1)
I don't understand this one
I have some Shell example code here
http://www.rondebruin.nl/mail/oebody.htm


2)
.SendMail "", "This is the Subject line"

don't fill in the address

If you use Outlook code then use Display in the code
See my site for examples
http://www.rondebruin.nl/sendmail.htm




--
Regards Ron de Bruin
http://www.rondebruin.nl


"lcoreyl" wrote in message
...

I am trying to send an email from within Excel VBA. I am currently
using a Shell command because I just want the email to open so the user
has the option to click send or do whatever else. I have 2 questions:

1.) If I use the shell command method, is there a way to check and see
if the email message is ready? Does it have a ready state to poll?

2.)If I use the .sendmail method, is there a way to have the email
brought up in a window?


--
lcoreyl
------------------------------------------------------------------------
lcoreyl's Profile: http://www.excelforum.com/member.php...fo&userid=2042
View this thread: http://www.excelforum.com/showthread...hreadid=384051




lcoreyl[_18_]

send email in VBA
 

.Display is what I was looking for. Thanks!

--
lcorey
-----------------------------------------------------------------------
lcoreyl's Profile: http://www.excelforum.com/member.php...nfo&userid=204
View this thread: http://www.excelforum.com/showthread.php?threadid=38405



All times are GMT +1. The time now is 02:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com