I have a spreadsheet with email addresses in column A, Subjects in column B
and some text in column C.
I want to use VBA in either Excel 2000 or Outlook 2000 to copy each row in
spreadsheet to emails - for example:
Copy cell A1 to TO field in Outlook
Copy cell B1 to SUBJECT field in Outlook
Copy cell C1 to MESSAGE BODY field in Outlook
Send the mail
Take the next row and do the same
My main problem is not knowing how to address the outlook fields from an
Excel macro
Can anyone help ?
Thanks
Nic
Sub CycleNSend()
' Set a reference to
' Outlook object model.
Dim cell As Range
Dim ol As Object
Dim mailitem As Object
Set ol = CreateObject("Outlook.Application")
For Each cell In Worksheets("Sheet1"). _
Range("A:A").SpecialCells(xlTextValues)
Set mailitem = ol.CreateItem(olMailItem)
With mailitem
.To = cell.Value
.Subject = cell.Offset(0, 1).Value
.Body = cell.Offset(0, 2).Value
.Send
End With
Set mailitem = Nothing
Next
Set ol = Nothing
End Sub
"Nic" <nic...@hotmail.com> wrote in message
news:95ma9r$a4t$1...@plutonium.btinternet.com...