Outlook - 通过从Excel中提取数据来自动发送电子邮件 [英] Outlook - Automated Email sending by pulling data from Excel

查看:1138
本文介绍了Outlook - 通过从Excel中提取数据来自动发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含大约500个名字的Excel电子表格,其中包含该人的姓名及其电子邮件地址等除了花费数周时间,输入标准电子邮件,从Excel电子表格中添加特定名称和电子邮件之外,我已经阅读了这个过程
可以使用Outlook和Excel进行自动化,这样可以节省数周时间。

I have a Excel spreadsheet with around 500 names containing the name of the person and their email address etc. Apart from spending weeks, typing up an standard email, adding the specific names and emails from an excel spreadsheet, I have read this process can be automated using Outlook and Excel which would save me weeks.

我正在使用Office 365并且主要使用Web客户端,但如果它更容易,可以使用PC上的Outlook客户端。我想做的就是,

I am using Office 365 and largely use the Web Client however can use the Outlook client on the PC if it makes it easier. All I want to do is,

1 - 创建标准电子邮件

1-Create the standard email

2 - 将其另存为模板

2-Save it as a template

3 - 然后让Outlook运行Excel电子表格,选择行中的第一封电子邮件,然后在同一行中选择此人的姓名和修改它在正文中并发送。

3-Then get Outlook to run through the Excel spreadsheet, pick the 1st email in the row, then in the same row pick the name of the person and amend it in the body and send.

4 - 对第二行,第三行....重复相同的过程,为500人。

4-Repeat the same process for the second row, third row....for 500 people.

我已经看到一些在线购买的插件但是不确定他们是否真的有效或他们有多强大因此想从专家那里找到最佳解决方案是哪个很容易微软向我指出了这个论坛。

I have seen some add-ins to buy online however wasn't sure if they actually work or how robust they were hence wanted to find out from the experts what the best solution was which was easy. Microsoft pointed me to this forum.

推荐答案

您好,

您可以创建一个宏Excel并自动运行Outlook以发送邮件。 

You could create a macro in Excel and automate Outlook to send mails. 

例如,下面的宏将首先创建模板,然后从邮件模板创建多个邮件项。阅读Excel以获取A2:A3中的名称并从B2获取邮件地址:B3。然后修改电子邮件地址和正文并发送。

For example, the macro below would create a template firstly and then create several mail items from the mail template. Read Excel to get the name from A2:A3 and get the mail address from B2:B3. Then amend the email address and body and send.

Sub CreateFromTemplate()
Dim myOlApp As Outlook.Application
Dim MyItem As Outlook.MailItem
Set myOlApp = CreateObject("Outlook.Application")
'Create template
Set MyItem = myOlApp.CreateItem(olMailItem)
MyItem.Subject = "Status Report"
MyItem.To = "Dan Wilson"
MyItem.Body = "Hi, Name"
'MyItem.Display
MyItem.SaveAs "D:\statusrep.oft", OlSaveAsType.olTemplate
Dim cell As Range
For Each cell In Range("A2:A3")
Set MyItem = myOlApp.CreateItemFromTemplate("D:\statusrep.oft")
With MyItem
.To = cell.Offset(0, 1).Value
.Body = Replace(.Body, "Name", cell.Value)
.Send 'or use .Display to show the mailitem
End With
Next
End Sub

您可以开始使用:

从Visual Basic应用程序自动化Outlook

< a href ="https://msdn.microsoft.com/en-us/library/vs/alm/aa209962(v=office.11​​).aspx">从其他Microsoft Office应用程序自动化Outlook

CreateItemFromTemplate方法

问候,

Celeste


这篇关于Outlook - 通过从Excel中提取数据来自动发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆