メインコンテンツへスキップ

Outlookが早すぎたり遅すぎたりしないようにするにはどうすればよいですか?

たとえば、毎日午前9時から午後00時まで働いていますが、今は午前6時に予約を取り、Outlookで00時間のリマインダーを追加しています。 つまり、リマインダーは作業開始前の午前10時に機能します。 一方、特別な場合には、リマインダーが深夜に鳴る場合があります。 これは非常に不便であり、一部のOutlookユーザーは、Outlookが早すぎたり遅すぎたりすることを防ぎたい場合があります。 ここでは、Outlookで解決するためのVBAマクロを紹介します。

Office タブ - Microsoft Office でタブによる編集と参照を有効にし、仕事をスムーズにします
Kutools for Outlook - 100 以上の高度な機能で Outlook を強化し、優れた効率を実現します
これらの高度な機能を使用して、Outlook 2021 ~ 2010 または Outlook 365 を強化します。 包括的な 60 日間の無料トライアルを利用して、メール エクスペリエンスを向上させてください。

Outlookの通知が早すぎたり遅すぎたりしないようにするには、次のようにします。

ステップ1: 他の + F11 その間にキーを押して、Microsoft Visual Basic forApplicationsウィンドウを開きます。

ステップ2:展開する MicrosoftOutlookオブジェクト 左側のペインで、次のVBAマクロをに貼り付けます このOutlookSession.

VBA:Outlookでリマインダーが早すぎたり遅すぎたりしないようにします

Public WithEvents g_CalendarItems As Outlook.Items
Public Sub Application_Startup()
Set g_CalendarItems = Outlook.Session.GetDefaultFolder(olFolderCalendar).Items
End Sub
Private Sub g_CalendarItems_ItemAdd(ByVal Item As Object)
CheckReminder Item
End Sub
Private Sub g_CalendarItems_ItemChange(ByVal Item As Object)
CheckReminder Item
End Sub
Sub CheckReminder(ByVal Item As Object)
On Error GoTo ProcError
Dim strProcName As String
strProcName = "CheckReminder"
reminderMaxHour = 20
reminderMinHour = 9
Dim aAptItem As Outlook.AppointmentItem
Set aAptItem = Item
If aAptItem.ReminderSet Then
Dim reminderDate As Date
reminderDate = aAptItem.Start - aAptItem.ReminderMinutesBeforeStart / (24 * 60)
reminderHour = (reminderDate - Int(reminderDate)) * 24
tolerance = 0.01 ' avoid floating point small diffs (little bit less than a min)
If reminderHour < reminderMinHour - tolerance Or reminderHour > reminderMaxHour + tolerance Then
' best guess, first try to advance to next minHour
reminderDateSuggestion = reminderDate + (reminderMinHour - reminderHour) / 24
' verify if first guess is valid
If reminderHour < reminderMinHour - tolerance And reminderDateSuggestion <= aAptItem.Start Then
' OK, first guess is valid, keep it
ElseIf reminderHour > reminderMaxHour Then
' go back to max hour (same day)
reminderDateSuggestion = reminderDate - (reminderHour - reminderMaxHour) / 24
Else
' go back to max hour (previous day)
reminderDateSuggestion = reminderDate - (reminderHour + 24 - reminderMaxHour) / 24
End If
rep = MsgBox("The Reminder time is out of specified working period. Would you like to change the Reminder time?" , vbQuestion + vbYesNoCancel)
If rep = vbCancel Then
aAptItem.Display
ElseIf rep = vbYes Then
aAptItem.ReminderMinutesBeforeStart = (aAptItem.Start - reminderDateSuggestion) * 24 * 60
aAptItem.Save
End If
End If
End If
ProcExit:
Exit Sub
ProcError:
MsgBox "Unanticipated error " & Err.Number & " " & Err.Description & vbCrLf & "In procedure: " & strProcName
End Sub

 

Note:上記のVBAコードで次のパラメータを変更して、作業期間を指定できます。
リマインダーMaxHour = 20
リマインダーMinHour = 9

手順3:このVBAを保存し、MicrosoftOutlookを再起動します。

今後、勤務期間を指定してリマインダータイムアウトのある予定を作成すると、クリックするとリマインダーを表示するダイアログボックスが表示されます。 保存して閉じる

リマインダー時間が指定されたreminderMinHourよりも早い場合は、 有り ダイアログボックスで、リマインダー時間を変更し、指定したリマインダーMinHourでリマインダーを鳴らします。

リマインダー時間が指定されたreminderMaxHourより遅い場合は、 有り ダイアログボックスでは、リマインダー時間が変更され、指定されたリマインダーMaxHourでリマインダーが表示されます。

注: このVBAコードはOutlook2013で正常に機能しますが、Outlook2010および2007では機能しません。


最高のオフィス生産性向上ツール

Outlook用Kutools - Outlook を強化する 100 以上の強力な機能

🤖 AIメールアシスタント: AI の魔法を備えたインスタント プロのメール - ワンクリックで天才的な返信、完璧な口調、多言語の習得。メールを簡単に変革しましょう! ...

📧 自動メール: 不在時 (POP および IMAP で利用可能)  /  メール送信のスケジュール設定  /  メール送信時のルールによる自動CC/BCC  /  自動転送 (高度なルール)   /  あいさつを自動追加   /  複数受信者の電子メールを個別のメッセージに自動的に分割する ...

📨 電子メール管理: メールを簡単に思い出す  /  件名などで詐欺メールをブロック  /  重複するメールを削除する  /  高度な検索  /  フォルダーを統合する ...

📁 アタッチメント プロバッチ保存  /  バッチデタッチ  /  バッチ圧縮  /  自動保存   /  自動デタッチ  /  自動圧縮 ...

🌟 インターフェースマジック: 😊もっと可愛くてクールな絵文字   /  タブ付きビューで Outlook の生産性を向上  /  Outlook を閉じる代わりに最小化する ...

???? ワンクリックの驚異: 受信した添付ファイルをすべてに返信する  /   フィッシングメール対策  /  🕘送信者のタイムゾーンを表示 ...

👩🏼‍🤝‍👩🏻 連絡先とカレンダー: 選択したメールから連絡先を一括追加  /  連絡先グループを個別のグループに分割する  /  誕生日のリマインダーを削除する ...

オーバー 100の特長 あなたの探索をお待ちしています! ここをクリックして詳細をご覧ください。

 

 

Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations