Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have an excel file on my website that customers can open to receive
activation numbers. After the VBA code gives the activation number, I need the VBA code to send an email to my address. Can someone show me sample VBA code to open a new email, add the address, Subject, and message and send the message. Any help would greatly appreciated. -- Larry |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ron has a section on his web site that deals with email.
http://www.rondebruin.nl/tips.htm "Larry" wrote in message ... I have an excel file on my website that customers can open to receive activation numbers. After the VBA code gives the activation number, I need the VBA code to send an email to my address. Can someone show me sample VBA code to open a new email, add the address, Subject, and message and send the message. Any help would greatly appreciated. -- Larry |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you for giving me the website. On Ron's website I found the VBA code
as shown below. I added it to my excel file with the changes so to write the information I need to the email. QUESTION: The excel file will be on my website and the VBA code requires OUTLOOK. Will every customer who enters my website need OUTLOOK before the VBA code can send me an email? What change to the VBA code do I need to make so it will work on the website. Thank you very much for your help. See sample code below. Sub Mail_small_Text_Outlook() ' Is working in Office 2000-2007 Dim OutApp As Object Dim OutMail As Object Dim strbody As String Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(0) Customer1= cells(2,3) Date1=cells(2,4) strbody = "Customer " & Customer1 & "received their activation code " & Date1 On Error Resume Next With OutMail .To = " .CC = "" .BCC = "" .Subject = "This is the Subject line" .Body = strbody .Display 'or use .Send End With On Error GoTo 0 Set OutMail = Nothing Set OutApp = Nothing End Sub -- Larry "JLGWhiz" wrote: Ron has a section on his web site that deals with email. http://www.rondebruin.nl/tips.htm "Larry" wrote in message ... I have an excel file on my website that customers can open to receive activation numbers. After the VBA code gives the activation number, I need the VBA code to send an email to my address. Can someone show me sample VBA code to open a new email, add the address, Subject, and message and send the message. Any help would greatly appreciated. -- Larry |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can,t send any email..get an error message | Excel Programming | |||
Send spreadsheet as email message | Excel Discussion (Misc queries) | |||
need macro for create new email message and send it | Excel Programming | |||
send email message | Excel Programming | |||
Send email with alert message | Excel Programming |