VBOffice

Confirm Before Moving an Appointment

Never again accidentally drag an apppointment to another day, or time by using this macro.

Last modified: 2014/10/02 | Accessed: 27.736  | #106
◀ Previous sample Next sample ▶
Category-Manager Category-Manager
With Category-Manager you can group your Outlook categories, share them with other users, filter a folder by category, automatically categorize new emails, and more. You can use the Addin even for IMAP.

In the calendar view, if you accidentally move an appointment and don't realize it, this may have serious consequences. The following macro allows you to cancel the process.

Paste the code to the ThisOutlookSession module, then restart Outlook.


tip  How to add macros to Outlook
Private WithEvents m_Exp As Outlook.Explorer

Private Sub Application_Startup()
  Set m_Exp = Application.ActiveExplorer
End Sub

Private Sub m_Exp_BeforeItemPaste(ClipboardContent As Variant, _
  ByVal Target As MAPIFolder, Cancel As Boolean _
)
  Dim Folder As Outlook.MAPIFolder
  Dim Msg As String

  Msg = "You are going to change an appointment. Continue?"

  Set Folder = m_Exp.CurrentFolder
  If Folder.DefaultItemType = olAppointmentItem Then
    Cancel = (MsgBox(Msg, vbYesNoCancel) <> vbYes)
  End If
End Sub
Reporter Reporter
VBOffice Reporter is an easy to use tool for data analysis and reporting in Outlook. A single click, for instance, allows you to see the number of hours planned for meetings the next month.
email  Send a message