Sharepoint Kalender zu einer bestimmen Kalender-Gruppe (Parent) hinzufügen

  • Outlook

    Sharepoint Kalender zu einer bestimmen Kalender-Gruppe (Parent) hinzufügen

    Edit: Habs mit PowerShell gelöst.

    Quellcode

    1. Add-Type -AssemblyName 'Microsoft.Office.Interop.Outlook'
    2. $olNavigationModule = 'Microsoft.Office.Interop.Outlook.OlNavigationModuleType' -as [type]
    3. $outlook = New-Object -comObject Outlook.Application
    4. $olNavigationPane = $outlook.Application.ActiveExplorer().NavigationPane
    5. $olCalendarModule = $olNavigationPane.Modules.GetNavigationModule($olNavigationModule::olModuleCalendar)
    6. $olCalendarGroups = $olCalendarModule.NavigationGroups
    7. $group = $olCalendarGroups.Create("Techniker")
    8. $Bereitschaft = $outlook.GetNamespace('MAPI').OpenSharedFolder('stssync://sts/?ver=1.1&type=calendar[...]name=Bereitschaft')
    9. $group.NavigationFolders.Add($Bereitschaft)


    ----

    Hi,

    ich möchte einen Sharepoint-Kalender zu einer bestimmten bestehenden Kalender-Gruppe in Outlook mit VBA hinzufügen, bzw. zu einer, die ich anlege:

    Quellcode

    1. Sub NewOutlookCalendarGroup()
    2. Dim objOutlook As Outlook.Application
    3. Dim objNavigationPane As Outlook.NavigationPane
    4. Dim objCalendarModule As Outlook.CalendarModule
    5. Dim objCalendarGroups As Outlook.NavigationGroups
    6. Dim objCalendarGroup As Outlook.NavigationGroup
    7. Dim objCalendarFolders As Outlook.NavigationFolders
    8. Dim url As String
    9. Set objNavigationPane = Application.ActiveExplorer.NavigationPane
    10. Set objCalendarModule = objNavigationPane.Modules.GetNavigationModule(olModuleCalendar)
    11. Set objCalendarGroups = objCalendarModule.NavigationGroups
    12. objCalendarGroups.Create ("Bereitschaft")
    13. Set objOutlook = CreateObject("Outlook.Application")
    14. url = "stssync://sts/?ver=1.1&type=calendar&cmd=add-folder&base-url=https[...]Bereitschaft"
    15. objOutlook.Session.OpenSharedFolder (url)
    16. End Sub


    Automatisch wird aber immer die Kalendergruppe "Andere Kalender" erstellt. Wie kann ich meine Kalendergruppe "Bereitschaft" zur Vorgabe (zum Parent) machen, damit der Sharepoint-Kalender dort eingebunden wird?

    Vielen Dank.

    imho

    Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von „imho74“ ()