Thursday, May 31, 2012

Visual Basic Script to make calendar objects public

Well those fine, fine people at Oracle make the default PRIVATE for ICS exports in Oracle Calendar Server 10.x.

SO we have options for making our process make them NON-PRIVATE if you wish.

OR if you want to migrate it as private and then change it, this VB script will help.


---------------------
Here is a VB Script that will make items public
---------------------


Dim appOutlook As New Outlook.Application
Dim OutlookItems As Outlook.Items

Public Sub ClearCalendarItemsPrivateFlag()
Set OutlookItems = appOutlook.GetNamespace("MAPI").GetDefaultFolder(olFolderCalendar).Items

For Each appointment In OutlookItems
    appointment.Sensitivity = olNormal  'or olPrivate if you want to turn it back
    appointment.Save
Next appointment

End Sub

1 comment:

zyg said...

This is no longer relevant if using our latest version of the Oracle Calendar Server to Exchange migration: http://calendarservermigration.blogspot.com/2015/04/oracle-calendar-migration-to_14.html