VBA in MS Outlook 2007, for Calendar item settings

DutchKevin

Board Regular
Joined
Apr 13, 2011
Messages
133
Office Version
  1. 365
Platform
  1. Windows
Hi,
Is there anybody who knows some code, or place where to look, for editing an Outlook calendar item with VBA.

Here's why; In my calendar I usually have 2 types of meeting.
One is by default, business related. It gets the usual 15 minutes reminder, is not private, and shows as busy on my calendar. Nothing special.
The other is the one is a private appointment. For those I always have to set three things manually each time. Mark it as private. It does not have a reminder, and shows as free in my calendar.
I'm looking for VBA code to do all those three things by the press of one button.

Any help or pointers are greatly appreciated.

Thanks
Kevin
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
This does the trick from within an appointment
Code:
Sub Private_Free_NoReminder()
Dim objItem As Object
Dim thisAppt As AppointmentItem
Set objItem = Application.ActiveExplorer.Selection(1)
If objItem.Class = olAppointment Then
Set thisAppt = objItem
thisAppt.Sensitivity = olPrivate
thisAppt.BusyStatus = olFree
thisAppt.ReminderSet = False
thisAppt.Save
End If
Set objItem = Nothing
Set thisAppt = Nothing
End Sub

not truly crossposted i would hope, but still...
https://superuser.com/questions/819451/code-in-ms-outlook-2007-for-calendar-item-settings
 
Upvote 0

Forum statistics

Threads
1,214,652
Messages
6,120,746
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top