![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Phil Goto Ron DeBruins site, he has what you need. http://www.rondebruin.nl/tips.htm http://www.rondebruin.nl/mail/folder3/message.htm This is a snippet that will enable you mail a list of recipients in a range. On Error Resume Next With OutMail .To = cell.Value .Subject = "Reminder" .Body = "Dear " & Cells(cell.Row, "A").Value _ I use something similar. HTH Mick |
#4
| |||
| |||
|
|
I use the following to send an email to various people. When there is a single MailTo name (e.g. Fred Smith) it works fine If I want to send it to Fred Smith and John Jones I have tried "Fred Smith; John Jones", but it only gets sent to the first person. John Jones in the Outlook address book twice, and I get asked which one I want to use, so Outlook is recognising both names. Do I need to do something with Outlook.Recipients Thanks Phil 'Create a new mailitem and bring Outlook window to front Set oItem = oOutlookApp.CreateItem(OLMailItem) oItem.Display FnSetForegroundWindow ("*outlook*") With oItem 'Set the recipient for the new email .To = MailTo 'Set the recipient for a copy .CC = "" 'Set the subject .Subject = Subject ReadReceiptRequested equested = MsgRead ' Flag for message read 'The content of the document is used as the body for the email If IsRtf = True Then ' Rtf message .BodyFormat = olFormatHTML .Body = "" .HTMLBody = RTFText Else ' Plain text .HTMLBody = BodyText End If 'Attachment is the attachment If AttachmentsFound = True Then For For j = LBound(Attach()) To UBound(Attach()) ' No of attachments If Not IsMissing(Attach(j)) Then If Attach(j) > "" Then Set olAttachment = .Attachments.Add(Attach(j)) End If End If Next j End If Call Call apWait(2, False) ' Time for the email to display before sending .Send End With |
#5
| |||
| |||
|
|
"Phil" <phil (AT) stantonfamily (DOT) co.uk> skrev i en meddelelse news:isalrt$4lr$1 (AT) speranza (DOT) aioe.org... I use the following to send an email to various people. When there is a single MailTo name (e.g. Fred Smith) it works fine If I want to send it to Fred Smith and John Jones I have tried "Fred Smith; John Jones", but it only gets sent to the first person. John Jones in the Outlook address book twice, and I get asked which one I want to use, so Outlook is recognising both names. Do I need to do something with Outlook.Recipients Thanks Phil 'Create a new mailitem and bring Outlook window to front Set oItem = oOutlookApp.CreateItem(OLMailItem) oItem.Display FnSetForegroundWindow ("*outlook*") With oItem 'Set the recipient for the new email .To = MailTo 'Set the recipient for a copy .CC = "" 'Set the subject .Subject = Subject ReadReceiptRequested equested = MsgRead ' Flag for message read 'The content of the document is used as the body for the email If IsRtf = True Then ' Rtf message .BodyFormat = olFormatHTML .Body = "" .HTMLBody = RTFText Else ' Plain text .HTMLBody = BodyText End If 'Attachment is the attachment If AttachmentsFound = True Then For For j = LBound(Attach()) To UBound(Attach()) ' No of attachments If Not IsMissing(Attach(j)) Then If Attach(j) > "" Then Set olAttachment = .Attachments.Add(Attach(j)) End If End If Next j End If Call Call apWait(2, False) ' Time for the email to display before sending .Send End With Maybe this article will be of use: http://msdn.microsoft.com/en-us/libr...ice.11%29.aspx |
#6
| |||
| |||
|
#7
| |||
| |||
|
#8
| |||
| |||
|
|
Doh...!!! Phil I kinda think I need a nanna-nap.....LMAO.... When I posted my reply, I neglected to take note of the fact that I was in the Access NG and I am doling out Excel Codes...... My Bad.... Forget I even responded.. Sorry... |
#9
| |||
| |||
|
|
I use the following to send an email to various people. When there is a single MailTo name (e.g. Fred Smith) it works fine If I want to send it to Fred Smith and John Jones I have tried "Fred Smith; John Jones", but it only gets sent to the first person. John Jones in the Outlook address book twice, and I get asked which one I want to use, so Outlook is recognising both names. Do I need to do something with Outlook.Recipients Thanks Phil 'Create a new mailitem and bring Outlook window to front Set oItem = oOutlookApp.CreateItem(OLMailItem) oItem.Display FnSetForegroundWindow ("*outlook*") With oItem 'Set the recipient for the new email .To = MailTo 'Set the recipient for a copy .CC = "" 'Set the subject .Subject = Subject ReadReceiptRequested equested = MsgRead ' Flag for message read 'The content of the document is used as the body for the email If IsRtf = True Then ' Rtf message .BodyFormat = olFormatHTML .Body = "" .HTMLBody = RTFText Else ' Plain text .HTMLBody = BodyText End If 'Attachment is the attachment If AttachmentsFound = True Then For For j = LBound(Attach()) To UBound(Attach()) ' No of attachments If Not IsMissing(Attach(j)) Then If Attach(j) > "" Then Set olAttachment = .Attachments.Add(Attach(j)) End If End If Next j End If Call Call apWait(2, False) ' Time for the email to display before sending .Send End With |
#10
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |