Consulting

Results 1 to 2 of 2

Thread: Run code only for specific calendar when multiple calendars available

  1. #1
    VBAX Newbie
    Joined
    Jan 2021
    Posts
    1
    Location

    Run code only for specific calendar when multiple calendars available

    Hello everyone,


    I'm dealing with a challenge for several weeks, and thought that maybe somone here will be able to solve it.


    I'm trying to set a VBA code for outlook that contains several calendars, and the code need to run only for one of them.

    The code is running every time a new appointment is created.


    I managed to run the code for every calendar on outlook, but couldn’t find out how to check if the appointment is from specific calendar, and only then run the code.

    Maybe a "if" line somewhere


    Could someone help me with that?



    Thanks in advnce!

  2. #2
    You need to identify the calendar in question by name e.g.

    Set olFolder = Session.GetDefaultFolder(olFolderCalendar).Parent.folders("Calendar Name")
    Then process the message if it is in that folder.
    Graham Mayor - MS MVP (Word) 2002-2019
    Visit my web site for more programming tips and ready made processes
    http://www.gmayor.com

Posting Permissions

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