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
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top