Note: The other languages of the website are Google-translated. Back to English
登陆  \/ 
x
or
x
注册  \/ 
x

or

如何在Outlook中发送计划定期电子邮件?

在Microsoft Outlook中,您可以轻松地向其他人发送日程安排重复约会,会议或任务。 但是,如果您只想发送定期重复的电子邮件而没有任何约会,会议或任务,该怎么办? 不幸的是,Outlook没有提供发送定期重复电子邮件的功能,但是在我们的教程中,我们将向您展示如何在Outlook中发送定期重复电子邮件。

使用VBA代码在Outlook中发送定期计划电子邮件

使用出色的工具在 Outlook 中轻松发送定期重复的电子邮件


使用VBA代码在Outlook中发送定期计划电子邮件

本教程分为四个部分,完成这些部分后,您将成功发送计划重复执行的电子邮件。 请执行以下操作。

第 1 部分:创建新约会

1.请浏览至 展会日历 点击查看 展会日历导航窗格,然后通过单击创建新约会 新任命首页 标签。

3。 在里面 任命 对话框下 任命 标签。 你需要:

答:输入 主题 B:在“收件人”中输入收件人的电子邮件地址 位置
C:配置 开始时间结束时间 D:在下方选择提醒 提醒 下拉列表。
如果您选择15分钟,则表示它将在发送电子邮件的15分钟前提醒您。
E:撰写您的约会内容。

备注:本 预约主题 将成为重复出现的电子邮件主题; 和 预约机构 收件人收到电子邮件后,它将成为重复出现的电子邮件正文。

第 2 部分:创建新类别

现在,您需要创建一个名为“发送计划定期电子邮件“ 如下:

1。 在里面 任命 对话框,请点击 分类 > 所有分类其他标签 组下 任命 标签。

2。 当。。。的时候 颜色分类 弹出对话框,请点击 按钮。 在里面 添加新类别 对话框中,输入“发送计划定期电子邮件“ 在里面 名称: 领域; 然后在 外观 下拉列表。 然后点击 OK.

3.然后您将看到“发送计划定期电子邮件”类别已列出,请选中该框,然后单击 OK 按钮。

第 3 部分:设置重复

现在,该设置约会的重复时间了。

1。 点击 循环 附加选项 组下 任命 标签。 看截图:

2。 在里面 预约定期 对话框中,配置您的 循环 模式。 如果您需要结束时间,请在下面进行配置 复发范围。 然后点击 OK.

3.返回到 任命 对话框,请点击 保存并关闭 按钮。 看截图:

第 4 部分:使用 VBA 代码发送计划定期电子邮件

1.请按 其他 + F11 打开 Microsoft Visual Basic应用程序 对话。

2.双击 Project1 > Microsoft Outlook对象 > 本次展望会议 在左窗格中。 看截图:

3.将以下VBA代码复制并粘贴到VBA编辑器中。 然后点击 优惠 按钮。

VBA:发送计划定期电子邮件

Private Sub Application_Reminder(ByVal Item As Object)
'Updated by Extendoffice 20200522
Dim xMailItem As MailItem
Dim xItemDoc As Word.Document
Dim xNewDoc As Word.Document
Dim xFldPath As String
On Error Resume Next
If Item.Class <> OlObjectClass.olAppointment Then Exit Sub
If Item.Categories <> "Send Schedule Recurring Email" Then Exit Sub
Set xMailItem = Outlook.Application.CreateItem(olMailItem)
Set xItemDoc = Item.GetInspector.WordEditor
xFldPath = CStr(Environ("USERPROFILE"))
xFldPath = xFldPath & "\MyReminder"
If Dir(xFldPath, vbDirectory) = "" Then
    MkDir xFldPath
End If
xFldPath = xFldPath & "\AppointmentBody.xml"
xItemDoc.SaveAs2 xFldPath, wdFormatXMLDocument ' wdFormatXML
Set xNewDoc = xMailItem.GetInspector.WordEditor
VBA.DoEvents
xNewDoc.Application.Selection.HomeKey
xNewDoc.Activate
xNewDoc.Application.Selection.InsertFile FileName:=xFldPath, Attachment:=False
With xMailItem
    .To = Item.Location
    .Recipients.ResolveAll
    .Subject = Item.Subject
    .Send
End With
Set xMailItem = Nothing
VBA.Kill xFldPath
End Sub

4。 点击 工具 > 參考資料 打开 參考資料 -项目 对话。 在对话框中,检查 Microsoft Word对象库 选项,然后单击 OK 按钮。

5。 按 其他 + Q 按键同时关闭 Microsoft Visual Basic应用程序 窗口。

当。。。的时候 提醒 弹出后,电子邮件将自动发送给您在第一部分的“位置”字段中键入的收件人。 然后点击 解除此信息提醒 对话。 并且电子邮件将在这段时间内每天重复发送。 看截图:

备注:VBA代码已在Outlook 2010和更高版本中成功测试。


使用出色的工具在 Outlook 中轻松发送定期重复的电子邮件

对于很多Outlook用户来说,上述方法过于繁琐,无法正确处理。 这里强烈推荐 安排自动发送 的特点 Kutools for Outlook. 使用此功能,您可以轻松创建多封重复电子邮件,并根据需要安排这些电子邮件每天、每周、每月或每年定期发送。 请按以下步骤完成。

在MyCAD中点击 软件更新 下载 Kutools for Outlook 尝试一下。

1。 点击 库工具 > 安排自动发送 > 创建自动发送计划.

2.然后一个消息窗口正在打开,您需要:

2.1) 在 收件人,抄送 or 密件抄送 根据需要填写字段,然后填写电子邮件 主题;
2.2) 撰写邮件正文;
2.3)点击 循环 在下面 Kutools 经常性 标签。 看截图:

3.现在 电子邮件重复 弹出对话框,需要指定 重复时间, 重复模式复发范围 对于电子邮件,然后单击 OK 按钮。

4. 现在它返回到消息窗口,单击 保存并关闭 按钮保存重复设置并关闭窗口。

提示: 您可以根据需要重复上述步骤 1 到 4 以创建多个定期电子邮件。

5. 现在通过单击打开该功能 库工具 > 安排自动发送 > 启用。

6.在开幕 Kutools for Outlook 对话框,单击 确定。

完成上述设置后,当到达指定的日期和时间时,将自动发送重复邮件。

请注意: 您可以按如下方式轻松管理重复发送的电子邮件。

1。 点击 库工具 > 安排自动发送 > 管理自动发送计划.

2。 在里面 管理自动发送计划 窗口,您可以创建 重复的电子邮件, 编辑、删除、 打开 or 关闭 您需要的现有定期电子邮件。 或者您可以点击 历史记录 图标以查看重复电子邮件的发送历史记录。

单击以了解有关此功能的更多信息.

  Kutools for Outlook 包括适用于Microsoft Outlook的100多种强大功能。 60天免费试用,不受限制。 现在下载!


Kutools for Outlook-为Outlook带来100个高级功能,并使工作更加轻松!

  • 自动CC / BCC 根据规则发送电子邮件; 自动转发 自定义多封电子邮件; 自动回复 没有交换服务器,还有更多自动功能...
  • BCC警告 -当您尝试全部答复时显示消息 如果您的邮件地址在“密件抄送”列表中; 缺少附件时提醒,还有更多提醒功能...
  • 在邮件对话中回复(全部)带有所有附件; 回复许多电子邮件 很快; 自动添加问候语 回复时将日期添加到主题中...
  • 附件工具:管理所有邮件中的所有附件, 自动分离, 全部压缩,全部重命名,全部保存...快速报告, 计算选定的邮件...
  • 强大的垃圾邮件 习俗 删除重复的邮件和联系人... 使您能够在Outlook中做得更聪明,更快和更好。
拍摄kutools前景kutools选项卡1180x121
拍摄kutools前景kutools加标签1180x121
 
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    SM · 1 months ago
    If you are having trouble with the email not sending after you get the reminder, look in your drafts folder. If the email is there then go back to the categories step and change the category to "Send Scheduled Recurring Email". The original instructions read "schedule" and not "scheduled". As soon as I did this, Outlook sent the email from my drafts folder and everything worked.
  • To post as a guest, your comment is unpublished.
    JM · 2 months ago
    hello, thank you this great code! It works like a charm. Is it possible to format the body of the email for HTML format?

  • To post as a guest, your comment is unpublished.
    Durgeshwaran N · 2 months ago
    I tried the above VBA Code, I am getting reminder everytime,
    But receipient does not receive my mail,
    Please assist
  • To post as a guest, your comment is unpublished.
    tarnold · 3 months ago
    I had a 2016 desktop version and everything worked great. I switched to Office 365 and it stopped working. Is there a setting (VBA Code?) that needs to be changed?
    Anyone else having this problem?
  • To post as a guest, your comment is unpublished.
    Günter · 4 months ago
    I'm useing a german Version of outlook. Whats i have to change in the VBA-code?

  • To post as a guest, your comment is unpublished.
    Mabpetroc · 4 months ago
    For me.  I needed to add 2x : 

    If Item.Class <> OlObjectClass.olAppointment Then 
    End If

    If Item.Categories <> "Send Schedule Recurring Email" Then Exit Sub
    End If

  • To post as a guest, your comment is unpublished.
    Prateek · 4 months ago
    how to add CC and BCC
  • To post as a guest, your comment is unpublished.
    pheadjack75 · 5 months ago
    this saves the email into the Drafts folder without a header or timestamp. How do I get it to include that header and timestamp; and saved in the Sent folder ?
  • To post as a guest, your comment is unpublished.
    Raj · 6 months ago
    I am facing issue with Email Body. in my received email it completely blank. what could be wrong
    • To post as a guest, your comment is unpublished.
      Natalia · 4 months ago
      Same for me, I don't know how to fix it 
      • To post as a guest, your comment is unpublished.
        Mabpetroc · 4 months ago
        scroll down - the question has been covered. :-)
  • To post as a guest, your comment is unpublished.
    JayPie · 7 months ago
    Is there a way to modify the code to only send the email if you hit "dismiss" and don't send the email if you "dismiss all" or some other button?
    I want to be able to chose each day if I send the email, but still want to be reminded each day.
    • To post as a guest, your comment is unpublished.
      Ryan Vargas · 1 months ago
      Would like to know this as well.
  • To post as a guest, your comment is unpublished.
    rayray4105 · 8 months ago
    For me the VBA halted on 'CStr(Environ("USERPROFILE"))'.

    I have moved both lines starting with 'xFldPth' just below 'On Error Resume Next' which resulted in the code to be fully executed
  • To post as a guest, your comment is unpublished.
    katie · 10 months ago
    This was working for me for several months. All of the sudden, the reminders are still appearing, but the emails are no longer being sent. Any ideas?
    • To post as a guest, your comment is unpublished.
      Fishy · 10 months ago
      Same here. Have you found what make it stop working?
    • To post as a guest, your comment is unpublished.
      FishyD · 10 months ago
      Same here, it was working great and over the last day or so, just broke.
  • To post as a guest, your comment is unpublished.
    Sohail · 10 months ago
    I am using Office 2016. I am unable to click on CATEGORIZE when doing through NEW APPOINTMENT but Categorize function properly when using NEW EMAIL.
  • To post as a guest, your comment is unpublished.
    Julia · 10 months ago
    Hi. How do I add attachments? I need to pull specific files each month and attach to the email. Is there a way to do this?
    • To post as a guest, your comment is unpublished.
      Matt · 2 months ago
      Private Sub Application_Reminder(ByVal Item As Object)
      'Updated by Extendoffice 20200522
      Dim xMailItem As MailItem
      Dim xItemDoc As Word.Document
      Dim xNewDoc As Word.Document
      Dim xFldPath As String
      On Error Resume Next
      If Item.Class <> OlObjectClass.olAppointment Then Exit Sub
      If Item.Categories <> "Send Schedule Recurring Email" Then Exit Sub
      Set xMailItem = Outlook.Application.CreateItem(olMailItem)
      Set xItemDoc = Item.GetInspector.WordEditor
      xFldPath = CStr(Environ("USERPROFILE"))
      xFldPath = xFldPath & "\MyReminder"
      If Dir(xFldPath, vbDirectory) = "" Then
      MkDir xFldPath
      End If
      xFldPath = xFldPath & "\AppointmentBody.xml"
      xItemDoc.SaveAs2 xFldPath, wdFormatXMLDocument ' wdFormatXML
      Set xNewDoc = xMailItem.GetInspector.WordEditor
      VBA.DoEvents
      xNewDoc.Application.Selection.HomeKey
      xNewDoc.Activate
      xNewDoc.Application.Selection.InsertFile FileName:=xFldPath, Attachment:=True
      With xMailItem
      .To = Item.Location
      .Recipients.ResolveAll
      .Subject = Item.Subject
      .Send
      End With
      Set xMailItem = Nothing
      VBA.Kill xFldPath
      End Sub
  • To post as a guest, your comment is unpublished.
    Phoebe · 11 months ago
    The emails are being generated but are going to draft folder and not being sent out automatically. How would I fix this?
  • To post as a guest, your comment is unpublished.
    Tellett · 1 years ago
    This didn't work for me until I realized that naming the category "Send Scheduled Recurring Email" instead of "Send Schedule Recurring Email" mattered. It was a comment below that brought it to my attention. Thanks!
  • To post as a guest, your comment is unpublished.
    yang · 1 years ago
    Doesn't work for Outlook 2016
  • To post as a guest, your comment is unpublished.
    Tony · 1 years ago
    I followed the instructions, but I get a .dll error when I check microsoft word 16.0 object library. I don't know if it matters, but the other object libraries show up as 14.0
  • To post as a guest, your comment is unpublished.
    Terri · 1 years ago
    often the location bar is unable to contain all of the email addresses for me, I can certainly use a distribution list or group contact but how do I unpack it so the resulting email shows the addresses individually?
  • To post as a guest, your comment is unpublished.
    sangeeta · 1 years ago
    It worked very well with MS Office 365 -outlook but then stopped working. I cant figure out what changed. Did anyone else run into similar problem? Any suggestion on how to debug what is going on?
  • To post as a guest, your comment is unpublished.
    ofek · 1 years ago
    I can confirm it works on Outlook 2019 as well
  • To post as a guest, your comment is unpublished.
    Kristen · 1 years ago
    Hi, been using this without issue for a few years. Suddenly in the last couple of months, it stopped sending the email. Reminder still goes out to me at least. I came here and and see the code has been updated, which I did and now I get "userdefined type not identified" error that others seem to have gotten. Is there a fix for this or no?
  • To post as a guest, your comment is unpublished.
    odhinto@gmail.com · 1 years ago
    I have followed all the instructions: I enabled Macros; I configured the appointment as instructed and added the VBA Macro....I checked all the references as instructed.
    The email is not being sent, and I'm not getting any compiler errors. What could be the problem? I'm using Outlook 2016.
    • To post as a guest, your comment is unpublished.
      Ricky · 1 years ago
      I can't get it to work either in Outlook 2016
  • To post as a guest, your comment is unpublished.
    Andrey · 1 years ago
    Is there a way to send the email from certain different e-mail (SendAs or SendOnBehalfOfName)?
  • To post as a guest, your comment is unpublished.
    Scott · 1 years ago
    Every time any reminder pops up, i am getting a VBA error of "userdefined type not identified".
    • To post as a guest, your comment is unpublished.
      Jon · 1 years ago
      Pardon me if this is something you already know, but without having other details besides what you posted, I suggest you make sure both microsoft office 16.0 object library AND microsoft word 16.0 object library are selected from step 4 above.
      • To post as a guest, your comment is unpublished.
        Nicola · 1 years ago
        This worked for me thank you

  • To post as a guest, your comment is unpublished.
    joaquimlmpires@gmail.com · 1 years ago
    Hi. I know this is an old post but I'm trying to use it to send a periodic email.

    I'm able to complete all the steps but the code line:
    Dim xItemDoc As Word.Document
    prompts a compile error: "userdeffined type not defined "

    I replaced with:
    Dim xItemDoc As DocumentItem

    compiles ok but emai does not get sent.

    anyone can help?

    thank you
  • To post as a guest, your comment is unpublished.
    Ron · 1 years ago
    I get the reminder but no email, ideas?
    • To post as a guest, your comment is unpublished.
      Scott · 1 years ago
      Same issue here
  • To post as a guest, your comment is unpublished.
    Marjorie · 1 years ago
    I received the email, however the body of the email is blank. I have put text and a signature in the body but when the email comes the body of the email is blank.
    • To post as a guest, your comment is unpublished.
      Jarrett · 1 years ago
      Try adding ".Body = Item.Body" under the line ".Subject = Item.Subject" in the VBA Code mentioned in this article.
      • To post as a guest, your comment is unpublished.
        Tony Fecteau · 1 years ago
        I have same issue, where on the code we have to adding
        ".Body = Item.Body" under the line ".Subject = Item.Subject"
        • To post as a guest, your comment is unpublished.
          Marcio Filho · 6 months ago
          Thank you very much Tony, you helped me a lot :D
  • To post as a guest, your comment is unpublished.
    Katie · 1 years ago
    I have followed all instructions and made sure the object library was checked etc but get the error 'compile error user type not defined' when it's time for the reminder.
    Any solutions to this?

    Thanks!
    • To post as a guest, your comment is unpublished.
      Mads · 1 years ago
      I get the same error. What's the solution here?
  • To post as a guest, your comment is unpublished.
    Vinay · 1 years ago
    It worked for me on Testing but when I made the changes to send it actually it didn't worked. Is there any specific modifications I needed to make? I see my Macro is disabled but it's on office system so I can't change it but assuming it worked for the first time it should work alright again; right?
  • To post as a guest, your comment is unpublished.
    tricia · 1 years ago
    how can this be sent to emails that change on a weekly basis?
    • To post as a guest, your comment is unpublished.
      OrionStar · 1 years ago
      If they change every week then it's not able to work really. What changes? if it's an attached file that should be fine because it grabs the file each time.
  • To post as a guest, your comment is unpublished.
    anne · 1 years ago
    this is not working for me
  • To post as a guest, your comment is unpublished.
    Sai Swaroop · 2 years ago
    I Tried using the above code it works very fine. But the problem is in the body of the email I am including Pictures, text and Hyperlinks to that. By the time mail reaching to the receiver everything is converting as a Text. Can anyone help me on this
    • To post as a guest, your comment is unpublished.
      crystal · 1 years ago
      Hi,
      Sorry for the inconvenience. The code has been updated to solve the problem. Please have a try and thank you for your comment.
      • To post as a guest, your comment is unpublished.
        Vinodh Kumar · 1 years ago
        Hi,
        I am facing the same issue. can you please post the updated code.

        Also is there any way to include email address as CC ?

  • To post as a guest, your comment is unpublished.
    Aarti · 2 years ago
    superb works for me thanks yaa
  • To post as a guest, your comment is unpublished.
    Priyank · 2 years ago
    It did work on my laptop before. I somewhat messed up my VBA. now it's not working..
    How do I restart of clear my VBA?

    I am not a programmer. I just wanted automatic email generated and googled it. Tried various things and then came across this post.

    It really worked well before. Please help
  • To post as a guest, your comment is unpublished.
    aerin.melvin@gmail.com · 2 years ago
    How do you add an attachment to go with the email that is sent?
  • To post as a guest, your comment is unpublished.
    Aerin · 2 years ago
    Is there a way to make this BCC?
  • To post as a guest, your comment is unpublished.
    Jan · 2 years ago
    I got to the VBA code copied, pasted, and saved fine. But no reminder popped up for me to dismiss. Will this still send?
    • To post as a guest, your comment is unpublished.
      crystal · 2 years ago
      Hi Jan,
      Please go to the Sent Items folder to check for the sending email.
  • To post as a guest, your comment is unpublished.
    Tomy · 2 years ago
    It's great work, tks
  • To post as a guest, your comment is unpublished.
    john · 2 years ago
    This is limited on the number of email addresses you can add in the locations. Any work arounds?
  • To post as a guest, your comment is unpublished.
    Kevin · 2 years ago
    This still works. Just tested on Office 2016/ O365. Make sure macros are enabled. Make sure you are pasting the code under "application" and "Reminder" as shown in the screen shot.
    • To post as a guest, your comment is unpublished.
      Daniele · 2 years ago
      Good, now it works!
      I've just one problem. If my Outlook client application is close, it don't work ...any solutions?
  • To post as a guest, your comment is unpublished.
    anitanashgh · 2 years ago
    I am getting a "compile error: invalid outside procedure" every time ANY reminder pops up, not just the one's for the scheduled send. Also, my scheduled send doesn't work. Any ideas? I copied and pasted the code from above. Thanks.
  • To post as a guest, your comment is unpublished.
    Anita · 2 years ago
    Not working for me.... :(
  • To post as a guest, your comment is unpublished.
    Kathrin · 2 years ago
    It didn't work for me either :/.Is there any update available?
  • To post as a guest, your comment is unpublished.
    Simon Hogh · 2 years ago
    This still works? :D
  • To post as a guest, your comment is unpublished.
    Simon · 2 years ago
    Does this still work? Unfortunately it doesn#t work for me...
  • To post as a guest, your comment is unpublished.
    SS · 3 years ago
    Does this go out as an invite? Does the recipient have to accept the invite?
    • To post as a guest, your comment is unpublished.
      Rebeccah · 2 years ago
      It's in the location field rather than in an invitee field, so, no - no invite goes out to the location address(es). No reminders to the location address(es) normally, either. This code is triggered by the application_reminder event for this appointment and adds functionality to it, to

      - create an e-mail message

      - put the appointment location address(es) in the To field of the e-mail message.

      - put the appointment subject line in the Subject field of the e-mail message.

      - put the appointment body in the Body field of the e-mail message.

      - send the e-mail message.
  • To post as a guest, your comment is unpublished.
    Johan · 3 years ago
    If I want multiple of these emails, each with a seperate category/calendar activity like "Send Schedule Recurring Email", "Send Schedule Recurring Email 2" & "Send Schedule Recurring Email 3" etc. How would I go about doing that? Do I copy this code all together for each category/calendar activity, or just add each "Send Schedule Recurring Email x" in the existing code? If so, how do I seperate them? Comma? < > ?
    • To post as a guest, your comment is unpublished.
      Rebeccah · 2 years ago
      Replace
      If Item.Categories <> "Send Schedule Recurring Email" Then Exit Sub
      with
      If Left(Item.Categories,29) <> "Send Schedule Recurring Email" Then Exit Sub


      Or, if your category names are all different, then
      If Item.Categories <> "First category name" AND Item.Categories <> "Second category name" AND Item.Categories <> "something completely different" Then Exit Sub
  • To post as a guest, your comment is unpublished.
    DTM · 3 years ago
    Just wanted to add my Thanks out here.
    I was struggling with my own version of this and found this and others.
    This is the best version of this I saw. Specifically what I like about it is - this works if you have multiple different emails you want to send. Because, it does not use "hardcoded" variables like the body or emails addresses pulling them from the appointment detail, you do not need to create different micros for each email or edit the code for every little detail that might change. You can even use this for non-reoccurring emails that you want o schedule (yes, you could do a delayed send). that's all controlled by the reoccurrence of the appointment.
    The one con is like any macro based solution, outlook does have to be open (running).

    A couple changes someone might want to make.
    If you do not want replies going to everyone who got the email, change .To - to .BCC.
    If you want to Review or make miner changes before it is sent, change .send to .display
  • To post as a guest, your comment is unpublished.
    Mel · 3 years ago
    I tried this but I cannot get my tests to work.