Outlook:如何作為組織者在日曆中保留取消會議?
在 Outlook 中,作為會議組織者,當您取消會議時,該會議將自動從日曆中刪除。 在某些情況下,您可能希望將取消的會議保留在日曆中以做一些標記。 但是,Outlook 中沒有可以處理此工作的內置功能。 在本教程中,它提供了兩個 VBA 代碼,用於在取消時將會議保留為約會。
將取消的會議複製為約會的 VBA 代碼
這裡有兩個代碼,用於取消會議並同時將其複制並粘貼為約會。
注意:在啟用代碼之前,請確保選中這兩個選項:
啟用Outlook,單擊 文件 > 選項, 在 Outlook 選項窗口中,單擊 信託中心 選項卡,然後單擊 信任中心設置,然後在“信任中心”窗口中,單擊 宏設置 選項卡,檢查 啟用所有的宏(不推薦;有潛在危險的代碼可以運行) 和 將宏安全設置應用於已安裝的加載項 選項。 點擊 OK > OK 關閉窗戶。 重新啟動 外表。
1. Swift 到 Outlook 日曆視圖,然後選擇要取消的會議 按 其他 + F11 鍵以啟用“ Microsoft Visual Basic應用程序”窗口。
2。 點擊 插入 > 模塊 插入一個新的空白模塊。 然後將下面的代碼複製並粘貼到其中。
代碼:將會議複製為約會並取消
Sub CopyMeetingAsAppointmentBeforeCancel()
'UpdatebyExtendoffice20221129
Dim xAppointmentItem As AppointmentItem
Dim xMeetingItem As AppointmentItem
On Error Resume Next
Set xMeetingItem = GetCurrentItem()
Set xAppointmentItem = Application.CreateItem(olAppointmentItem)
With xAppointmentItem
.Subject = "Canceled: " & xMeetingItem.Subject
.Start = xMeetingItem.Start
.Duration = xMeetingItem.Duration
.Location = xMeetingItem.Location
.Body = xMeetingItem.Body
.Save
.Move Application.ActiveExplorer.CurrentFolder
End With
With xMeetingItem
.MeetingStatus = olMeetingCanceled
.Send
.Delete
End With
Set xAppointmentItem = Nothing
Set xMeetingItem = Nothing
End Sub
Function GetCurrentItem() As Object
On Error Resume Next
Select Case TypeName(Application.ActiveWindow)
Case "Explorer"
Set GetCurrentItem = Application.ActiveExplorer.Selection.Item(1)
Case "Inspector"
Set GetCurrentItem = Application.ActiveInspector.CurrentItem
End Select
End Function
3。 點擊 跑 按鈕或按下 F5 鍵,現在選定的會議已被取消,並且有一個名為 Cancled & subjet 的新約會。
如果您想將會議複製並粘貼為另一個日曆中的約會,然後取消會議,請使用以下代碼:
代碼:將會議複製為另一個日曆中的約會並取消它
Sub CopyMeetingAsAppointmentToCalenderBeforeCancel()
'Updatebyextendoffice20221129
Dim xDestCalendar As Outlook.MAPIFolder
Dim xNameSpace As Outlook.NameSpace
Dim xAppointmentItem As AppointmentItem
Dim xMeetingItem As AppointmentItem
On Error Resume Next
Set xNameSpace = Application.GetNamespace("MAPI")
Set xDestCalendar = xNameSpace.PickFolder
If xDestCalendar.DefaultItemType <> olAppointmentItem Then
MsgBox "Please Select calendar folder. ", vbOKOnly + vbInformation, "Kutools for Outlook"
Exit Sub
End If
Set xMeetingItem = GetCurrentItem()
Set xAppointmentItem = Application.CreateItem(olAppointmentItem)
With xAppointmentItem
.Subject = "Canceled: " & xMeetingItem.Subject
.Start = xMeetingItem.Start
.Duration = xMeetingItem.Duration
.Location = xMeetingItem.Location
.Body = xMeetingItem.Body
.Save
.Move xDestCalendar
End With
With xMeetingItem
.MeetingStatus = olMeetingCanceled
.Send
.Delete
End With
Set xDestCalendar = Nothing
Set xNameSpace = Nothing
Set xAppointmentItem = Nothing
Set xMeetingItem = Nothing
End Sub
Function GetCurrentItem() As Object
On Error Resume Next
Select Case TypeName(Application.ActiveWindow)
Case "Explorer"
Set GetCurrentItem = Application.ActiveExplorer.Selection.Item(1)
Case "Inspector"
Set GetCurrentItem = Application.ActiveInspector.CurrentItem
End Select
End Function
點擊 跑 按鈕或按下 F5 鍵,會彈出一個選擇文件夾對話框,讓您選擇一個日曆文件夾來粘貼約會,然後單擊確定。
現在會議已取消並作為約會復制並粘貼到您選擇的日曆文件夾中。
最佳辦公生產力工具
Kutools for Outlook - 超過 100 種強大的功能可增強您的 Outlook
🤖 人工智慧郵件助手: 具備人工智慧魔力的即時專業電子郵件——一鍵天才回覆、完美語調、多語言掌握。輕鬆改變電子郵件! ……
📧 電子郵件自動化: 外出(適用於 POP 和 IMAP) / 安排發送電子郵件 / 發送電子郵件時按規則自動抄送/密件副本 / 自動轉送(進階規則) / 自動添加問候語 / 自動將多收件者電子郵件拆分為單獨的訊息 ...
📨 電子郵件管理: 輕鬆回憶電子郵件 / 按主題和其他人阻止詐騙電子郵件 / 刪除重複的電子郵件 / 進階搜索 / 合併資料夾 ...
📁 附件專業版: 批量保存 / 批量分離 / 批量壓縮 / 自動保存 / 自動分離 / 自動壓縮 ...
🌟 介面魔法: 😊更多又漂亮又酷的表情符號 / 使用選項卡式視圖提高 Outlook 工作效率 / 最小化 Outlook 而不是關閉 ...
👍 一鍵奇蹟: 使用傳入附件回覆全部 / 反網路釣魚電子郵件 / 🕘顯示寄件者的時區 ...
👩🏼🤝👩🏻 通訊錄和行事曆: 從選定的電子郵件中大量新增聯絡人 / 將聯絡人群組拆分為各組 / 刪除生日提醒 ...
超過 100特點 等待您的探索! 按此處了解更多。