The author is using a friend email address of the Excel file automatically send e-mail to relatives and friends, this method is not only convenient and quick, and these messages to the recipient, subject, content, accessories are not the same.
First, the establishment of friends and relatives directory
Create a list of friends and relatives in your worksheet that contains different recipients, topics, content, and attachments.
II. using macros to automate e-mail delivery
Open the tools → macros →visual basic Editor, click insert → module to insert a module, double-click the inserted module in the Engineering window, open its Code window, and enter the following macro:
Sub automatic Send mail ()
"To be able to send correctly and require an effective configuration of microseft outlook
On Error Resume Next
Dim RowCount, Endrowno
Dim Objoutlook as New outlook.application
Dim objmail as MailItem
"Gets the number of rows of data area connected to the current worksheet and cells (1,1)
Endrowno = Cells (1, 1). CurrentRegion.Rows.Count
"Create Objoutlook as Outlook Application object
Set Objoutlook = New Outlook.Application
"Start the loop to send e-mail
For rowcount = 2 to Endrowno
"Create Objmail as a mail object
Set objmail = Objoutlook.createitem (olMailItem)
"Set the recipient address (obtained from the e-mail address field of the Address Book table)
. to = Cells (rowcount, 2)
"Set the message subject
. Subject = "Good New Year!" [Greetings from a friend of the people] "
"Set the content of the message (obtained from the Content field in the Address Book table)
. BODY = Cells (rowcount, 3)
"Set attachments (obtained from the Attachment field in the Address Book table)
. Attachments.Add Cells (ROWCOUNT, 4)
"Send messages automatically
"Destroy the Objmail object
Set objmail = Nothing
"Destroy the Objoutlook object
Set Objoutlook = Nothing
"Prompt when all e-mail is sent complete
MsgBox rowCount-1 && "a friend's greeting letter sent successfully!"
The above code is passed in Excel 2000, and the "Address Book" and "Fully automated mail" macro code are slightly modified to deliver a large number of messages in any form.