vba code to change all private appointments to public

Joined
May 3, 2015
Messages
2
Reaction score
0
Hi,

I am new to vba and I am not a programmer. I used Ken Slovak's code below to change all my outlook calendar appointments to private and now I would like to know if there is a way to reverse this code or to find another code to make all my private appointments back to public:

Sub MakeAllPrivate()
Dim oFolder As Outlook.MAPIFolder
Dim oItems As Outlook.Items
Dim oAppt As Outlook.AppointmentItem

On Error Resume Next

Set oFolder = Application.Session.GetDefaultFolder(olFolderCalendar)
Set oItems = oFolder.Items
For Each oAppt In oItems
If Err Then
Err.Clear
Else
oAppt.Sensitivity = olPrivate
oAppt.Save
End If
Next
End Sub


Many thanks for your help.
Gordon
 
Back
Top