+ Reply to Thread
Results 1 to 1 of 1

Outlook / VBA Help

  1. #1
    Registered User
    Join Date
    MS-Off Ver
    Excel 2013

    Outlook / VBA Help


    I have a portion of VBA that is doing part of what I need. Let me explain my end goal first.

    We have a calendar management requirement for management to requires their calendars to be completed for the next week by EOD Thursday. I am in charge of running this and every Friday morning I open outlook, open calendar groups (closing my personal default one), update folders to ensure the calendars have all updated. I move the calendar (week view) to the next week and take a snippet of the calendar saving it in an archive. Once all compiled I send a notice out to the team to review their calendars if necessary.

    So what I have Outlook doing is opening a calendar group with the code below. What I need it to do is close the default calendar, advance to the next calendar week and "update". Since Outlook doesn't appear to support macro recording I have no idea what any of the fields are called or where to begin on this other than what I have below. Any help on the code and/or how to identify the items in outlook and calls I should be using is greatly appreciated. Once I can get Outlook to perform this I will set a bat file to open it at a set time and utilize another tool to screenshot this for me for when I'm not in the office.

    HTML Code: 
    Private Sub Application_Startup()
        Dim olPane As NavigationPane
        Dim olMod As CalendarModule
        Dim olGrp As NavigationGroup
        Dim olNavFld As NavigationFolder
        Dim olCalFld As Folder
        Set Application.ActiveExplorer.CurrentFolder = Session.GetDefaultFolder(olFolderCalendar)
        Set olCalFld = Session.GetDefaultFolder(olFolderCalendar)
        Set olPane = Application.ActiveExplorer.NavigationPane
        Set olMod = olPane.Modules.GetNavigationModule(olModuleCalendar)
        Set olGrp = olMod.NavigationGroups.Item("Shared Calendars")
        For I = 1 To olGrp.NavigationFolders.Count
            Set olNavFld = olGrp.NavigationFolders.Item(I)
            olNavFld.IsSelected = True
    End Sub
    Last edited by 6StringJazzer; 11-06-2018 at 10:16 AM. Reason: Moved from Excel Programming / VBA / Macros

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1