Note: The other languages of the website are Google-translated. Back to English
ログイン  \/ 
x
or
x
今すぐ登録  \/ 
x

or

Outlookで定期的なスケジュールの電子メールを送信するにはどうすればよいですか?

Microsoft Outlookでは、スケジュールの定期的な予定、会議、またはタスクを他のユーザーに簡単に送信できます。 しかし、予定、会議、タスクなしでスケジュールの定期的な電子メールを送信したいだけの場合、どうすればよいでしょうか。 残念ながら、Outlookには定期的なスケジュールの電子メールを送信する機能はありませんが、チュートリアルでは、Outlookで定期的なスケジュールの電子メールを送信する方法を説明します。

OutlookでVBAコードを使用してスケジュール定期メールを送信する


OutlookでVBAコードを使用してスケジュール定期メールを送信する

このチュートリアルはXNUMXつのパートに分かれており、これらのパートを完了すると、スケジュールの定期的な電子メールを送信できます。 次のようにしてください。

最初の部分:新しい予定を作成する

1.に移動してください カレンダー クリックして表示 カレンダー ナビゲーションペイン、をクリックして新しい予定を作成します 新しい予定ホーム タブでを確認できます。

3。 の中に 任命 下のダイアログ 任命 タブ。 必要がある:

A:を入力してください 件名 B:受信者のメールアドレスを ロケーション
C:構成 開始時刻終了時間 D:下のリマインダーを選択します リマインダー ドロップダウンリスト。
15分を選択すると、メールが送信されたときに15分早く通知されます。
E:アポイントメントボディを作成します。

ノート予定の件名 定期的なメールの件名になります。 そしてその 任命機関 受信者が電子メールを受信すると、定期的な電子メールの本文になります。

第XNUMX部:新しいカテゴリを作成する

次に、「」という名前の新しいカテゴリを作成する必要があります。スケジュール定期メールを送信する" 次のように:

1。 の中に 任命 ダイアログをクリックしてください 分類する > すべてのカテゴリ タグ 下のグループ 任命 タブでを確認できます。

2。 いつ カラーカテゴリ ダイアログがポップアップします。クリックしてください New ボタン。 の中に 新しいカテゴリを追加 ダイアログに「スケジュール定期メールを送信する「中 お名前 フィールド; 次に、で色を選択します ドロップダウンリスト。 次に、をクリックします OK.

3.次に、「スケジュール定期メールを送信する」カテゴリがリストされているので、チェックボックスをオンにしてからクリックしてください OK ボタン。

第三部:繰り返しを設定する

さて、アポイントメントの繰り返しを設定する時が来ました。

1。 クリック 再発 オプション 下のグループ 任命 タブ。 スクリーンショットを参照してください:

2。 の中に 予定の再発 ダイアログで、 再発 パターン。 終了時間が必要な場合は、下で構成してください 再発の範囲。 そして、 OK.

3.に戻ったとき 任命 ダイアログをクリックしてください 保存して閉じる ボタン。 スクリーンショットを参照してください:

最後:VBAコードを使用してSchedule RecurringEmailを送信します

1.を押してください 他の + F11 を開く Microsoft Visual Basic for Applications ダイアログ。

2.をダブルクリックします Project1 > MicrosoftOutlookオブジェクト > ThisOutlookSession 左側のペインで。 スクリーンショットを参照してください:

3.次のVBAコードをコピーしてVBAエディターに貼り付けます。 そして、 セットで€6 ボタン。

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。 クリック BHツール > リファレンス を開く リファレンス - 事業 ダイアログ。 ダイアログで、 MicrosoftWordオブジェクトライブラリ オプションをクリックして OK ボタン。

5。 プレス 他の + Q 同時にキーを閉じて Microsoft Visual Basic for Applications 窓。

リマインダー ポップアップすると、最初の部分の[場所]フィールドに入力した受信者に電子メールが自動的に送信されます。 次に、をクリックします 却下する リマインダー ダイアログ。 そして、この時間帯に毎日定期的にメールが送信されます。 スクリーンショットを参照してください:

ノート:VBAコードは、Outlook2010以降のバージョンで正常にテストされました。


Kutools for Outlook-100の高度な機能をOutlookにもたらし、作​​業をはるかに簡単にします!

  • 自動CC / BCC メール送信時のルールによる。 自動転送 カスタムによる複数の電子メール。 自動返信 Exchangeサーバーなし、およびより多くの自動機能...
  • 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.
    Raj · 19 days 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.
    Marcio Filho · 1 months ago
    @Tony Fecteau Thank you very much Tony, you helped me a lot :D
  • To post as a guest, your comment is unpublished.
    JayPie · 1 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.
    rayray4105 · 2 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.
    Fishy · 4 months ago
    @katie Same here. Have you found what make it stop working?
  • To post as a guest, your comment is unpublished.
    FishyD · 4 months ago
    @katie Same here, it was working great and over the last day or so, just broke.
  • To post as a guest, your comment is unpublished.
    katie · 4 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.
    Sohail · 5 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 · 5 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.
    Phoebe · 6 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 · 8 months 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 · 9 months ago
    Doesn't work for Outlook 2016
  • To post as a guest, your comment is unpublished.
    Tony · 9 months 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.
    Nicola · 10 months ago
    @Jon This worked for me thank you

  • To post as a guest, your comment is unpublished.
    Ricky · 10 months ago
    @odhinto@gmail.com I can't get it to work either in Outlook 2016
  • To post as a guest, your comment is unpublished.
    Vinodh Kumar · 10 months ago
    @GP Hi,

    I am getting syntax error. Help me pls.
  • To post as a guest, your comment is unpublished.
    Vinodh Kumar · 10 months ago
    @crystal 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.
    Terri · 10 months 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.
    Tony Fecteau · 10 months ago
    @Jarrett 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.
    sangeeta · 11 months 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 · 11 months ago
    I can confirm it works on Outlook 2019 as well
  • To post as a guest, your comment is unpublished.
    Kristen · 11 months 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.
    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.
    Jon · 1 years ago
    @Scott 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.
    Jarrett · 1 years ago
    @Marjorie 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.
    Scott · 1 years ago
    @Ron Same issue here
  • 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.
    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.
    Sol Roberts-Lieb · 1 years ago
    @Mads I had the same error as well.
  • To post as a guest, your comment is unpublished.
    Mads · 1 years ago
    @Katie I get the same error. What's the solution 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.
    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.
    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.
    OrionStar · 1 years ago
    @tricia 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.
    crystal · 1 years ago
    @Sai Swaroop 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.
    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.
    anne · 1 years ago
    this is not working for me
  • To post as a guest, your comment is unpublished.
    Sai Swaroop · 1 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.
    Aarti · 1 years ago
    superb works for me thanks yaa
  • To post as a guest, your comment is unpublished.
    Priyank · 1 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 · 1 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 · 1 years ago
    Is there a way to make this BCC?
  • To post as a guest, your comment is unpublished.
    crystal · 1 years ago
    @Jan Hi Jan,
    Please go to the Sent Items folder to check for the sending email.
  • To post as a guest, your comment is unpublished.
    Daniele · 1 years ago
    @Kevin 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.
    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.
    Rebeccah · 2 years ago
    @SS 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.
    Rebeccah · 2 years ago
    @Johan 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.
    Tomy · 2 years ago
    It's great work, tks