+ Reply to Thread
Results 1 to 3 of 3

Add Appointments to Common(!) Diary. Working Macro for Personal Diary included.

  1. #1
    Registered User
    Join Date
    03-05-2011
    Location
    Switzerland
    MS-Off Ver
    Excel 2007
    Posts
    15

    Post Add Appointments to Common(!) Diary. Working Macro for Personal Diary included.

    Hi guys and thanks for even starting to read this,

    I have a list of dates and subjects and need to add them to Outlook as appointments. The macro below can add them to my personal calendar. It also checks if they are already there so that they don't duplicate.

    However, when I try adding it to the shared common diary, things get complicated. I can manually add appointments to it, so I shouldn't have a permission issue, I just don't know how to change the calendars, within the "outlook folders". I found an article online (here), which says that the guy was unable to add appointments to the common diary if he hasn't created it himslef, but this just sounds so bad, I really don't want to loose hope. There must be a nice way to do it. I can't create a new diary, because the existing one is already quite full and it will be a nightmare to copy everything, plus then I will be the admin, which means more work...
    The suggestion of the article mentioned above is to play around with the "outlook folders" but I can't seem to grasp what he is doing there. In case this will help you, when I right click my calendar>properties its location is : "\\[email protected]". The same action for the Common Diary, where I want to include this gives: "\\Common Diary".

    To sum it up: I am looking for a (hopefully) small amendment of my code, so that instead of adding it to my diary, the macro ads it to the common diary. Thanks!

    Here is my data in the respective rows and columns on a sheet called "2013-Calendar":
    AB AC AD
    Row 4 Y 01-Jan-13 Appointment Subject 1
    Row 5 Y 02-Jan-13 Appointment Subject 2
    Row 6 03-Jan-13 Appointment Subject 3

    Here is my code:
    Please Login or Register  to view this content.
    Thanks for giving it a try and reading till the finish,
    Slone
    Last edited by Slone; 12-21-2012 at 09:08 AM.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Add Appointments to Common(!) Diary. Working Macro for Personal Diary included.

    Replace this...
    Set colItems = NS.GetDefaultFolder(olFolderCalendar).Items
    With something like this...
    Set colItems = NS.Folders("Common Diary").Folders("Calendar").Items

    And replace this...
    Set olAppItem = OL.CreateItem(olAppointmentItem)
    With this...
    Set olAppItem = colItems.Add(olAppointmentItem)

  3. #3
    Registered User
    Join Date
    03-05-2011
    Location
    Switzerland
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Add Appointments to Common(!) Diary. Working Macro for Personal Diary included.

    This is exactly the solution I needed. Thanks a lot for the great answer!
    The code above must still work, find below how my code has evolved to include two check box types: 1-11 are to add to my calendar, while 11-22 are to add to the common calendar.
    Please Login or Register  to view this content.
    Last edited by Slone; 01-10-2013 at 12:51 PM. Reason: Spelling

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Bookmarks

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