Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default sending email using macros

hi
How can i send email to a lotus notes server or other email servers
using excel macro by clicking a button.
I read in the newsgroups to use SendKeys or CDO but is there any
examples on how to do that?
thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default sending email using macros

Hi

I have CDO examples on my site
http://www.rondebruin.nl/cdo.htm

I believe the Body Outlook Express examples are also working with Notes
http://www.rondebruin.nl/mail/oebody.htm


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



wrote in message oups.com...
hi
How can i send email to a lotus notes server or other email servers
using excel macro by clicking a button.
I read in the newsgroups to use SendKeys or CDO but is there any
examples on how to do that?
thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default sending email using macros


Ron, can you help me to get started with this..?

From this part on I´m totally confused.

"Sub Message()
' This example use late binding, you don't have to set a reference
' You must be online when you run the sub
Dim iMsg As Object
Dim iConf As Object
Dim cell As Range
' Dim Flds As Variant"

Can you tell me what to press and where to insert all this stuff..??

Thanks!


--
AndyOne
------------------------------------------------------------------------
AndyOne's Profile: http://www.excelforum.com/member.php...o&userid=20217
View this thread: http://www.excelforum.com/showthread...hreadid=374879

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default sending email using macros

Hi Andy

You must copy the macro in a module in your workbook

We use this test macro

Fill in your server in this macro in this line
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "Fill in your SMTP server here"
And your e-mail address in this line
.To = "


Sub Mail_CDO()
Dim iMsg As Object
Dim iConf As Object
Dim Flds As Variant
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
iConf.Load -1 ' CDO Source Defaults
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "Fill in your SMTP server here"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With
With iMsg
Set .Configuration = iConf
.To = "
.CC = ""
.BCC = ""
.From = """Ron"" "
.Subject = "Important message"
.TextBody = "Hi there" & vbNewLine & vbNewLine & _
"Good evening"
.Send
End With
Set iMsg = Nothing
Set iConf = Nothing
End Sub

First we open the VBA editor with Alt-F11
Then we use InsertModule
Copy/Paste the macro in this module (change the address in the macro to yours(for testing))
Now we use Alt-Q to go back to Excel


Then In Excel we use Alt-F8 to get the list with macro's
Select the macro and press Run

Post back if you need more help


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



"AndyOne" wrote in message
...

Ron, can you help me to get started with this..?

From this part on I´m totally confused.

"Sub Message()
' This example use late binding, you don't have to set a reference
' You must be online when you run the sub
Dim iMsg As Object
Dim iConf As Object
Dim cell As Range
' Dim Flds As Variant"

Can you tell me what to press and where to insert all this stuff..??

Thanks!


--
AndyOne
------------------------------------------------------------------------
AndyOne's Profile: http://www.excelforum.com/member.php...o&userid=20217
View this thread: http://www.excelforum.com/showthread...hreadid=374879



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default sending email using macros


Hey Ron;

thanks for your help.

Do I have to (and how) save the macro before going back to excel?
Because; if not, it does not appear on the list of macros.

Andy


--
AndyOne
------------------------------------------------------------------------
AndyOne's Profile: http://www.excelforum.com/member.php...o&userid=20217
View this thread: http://www.excelforum.com/showthread...hreadid=374879



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default sending email using macros

Because; if not, it does not appear on the list of macros.

Try it again

First we open the VBA editor with Alt-F11
Then we use InsertModule
Copy/Paste the macro in this module (change the address in the macro to yours(for testing))
Now we use Alt-Q to go back to Excel

It is in the Alt-F8 list now
If you save the file you will save the macro also


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



"AndyOne" wrote in message
...

Hey Ron;

thanks for your help.

Do I have to (and how) save the macro before going back to excel?
Because; if not, it does not appear on the list of macros.

Andy


--
AndyOne
------------------------------------------------------------------------
AndyOne's Profile: http://www.excelforum.com/member.php...o&userid=20217
View this thread: http://www.excelforum.com/showthread...hreadid=374879



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
Sending a Spreadsheet as an Email Attachment vs. Imbedded in Email billbrandi Excel Discussion (Misc queries) 1 April 3rd 08 03:44 AM
Have problem sending spreadsheet email and losing custom toolbar and macros memphoman Excel Discussion (Misc queries) 0 January 19th 06 08:40 PM
Email sending colourp Excel Discussion (Misc queries) 1 January 13th 06 01:13 AM
Sending an email Jamie Excel Programming 2 October 14th 04 02:51 PM
Error in Sending Email via CDO Danniel Chen Excel Programming 9 October 13th 04 01:51 PM


All times are GMT +1. The time now is 07:21 PM.

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

About Us

"It's about Microsoft Excel"