+ Reply to Thread
Results 1 to 7 of 7

Excel to shared calendar macro

  1. #1
    Registered User
    Join Date
    02-22-2017
    Location
    England
    MS-Off Ver
    2010
    Posts
    6

    Excel to shared calendar macro

    Hello I am in desperate need of some help! please take a look at the following code that works for putting appointments into my own default calendar in outlook, however I require it to input to a shared calendar. I have looked all over and found the Dim outlook.folder but I keep getting compile error I know the code below isn't clean but any help would be greatly appreciated


    if this helps the shared calendar is in "all public folders/workforce admin/WFD/WFD Adults"


    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Excel to shared calendar macro

    As you seem to be using Late Binding, oFolder should be declared as an Object. 'Outlook.Folder' means nothing unless you have a references set to the Outlook Object model (Early Binding).

    You will also need to define other constants (olPublicFoldersAllPublicFolders, for example) which are defined in Outlook, exactly the same as you have done for olAppointmentItem

  3. #3
    Registered User
    Join Date
    02-22-2017
    Location
    England
    MS-Off Ver
    2010
    Posts
    6

    Re: Excel to shared calendar macro

    I am really sorry but I am completely out of my depth here I cant seem to implement the changes you suggested

  4. #4
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Excel to shared calendar macro

    What have you tried...?

    Declare oFolder as type Object
    Define a constant for olPublicFoldersAllPublicFolders

    You'll find the enumerations for Outlook folders here. Define a constant, same as olAppointmentItem, for olPublicFoldersAllPublicFolders using the appropriate value from that list.

    If there are any other ol... variables in code you haven't posted then they need to be defined as well.

  5. #5
    Registered User
    Join Date
    02-22-2017
    Location
    England
    MS-Off Ver
    2010
    Posts
    6

    Re: Excel to shared calendar macro

    Hi this is what I have

    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Excel to shared calendar macro

    You have an oNameSpace object which is never assigned a value - at a guess this should be OLNS rather than oNameSpace.

    I didn't look at the code except for the obvious issues mentioned in your first post but the code adds an appointment to the default calendar and then gets a reference to to the folder WFD Adults... but doesn't do anything. You need to rejig the code - get the reference to the folder then add the appointment.

    You might find a reply from yesterday in another thread helpful: http://www.excelforum.com/excel-prog...ml#post4588280

  7. #7
    Registered User
    Join Date
    02-22-2017
    Location
    England
    MS-Off Ver
    2010
    Posts
    6

    Re: Excel to shared calendar macro

    managed to sort it using a different way of linking to the calendar code attached for benefit of anyone else looking this up


    Please Login or Register  to view this content.
    Thank you for all your help and I greatly appreciate your time

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Help with VB code to send Outlook Meeting Request from Shared Calendar via excel
    By rv02 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-06-2017, 09:50 AM
  2. Replies: 1
    Last Post: 02-06-2017, 09:50 AM
  3. Replies: 1
    Last Post: 02-06-2017, 09:50 AM
  4. Replies: 0
    Last Post: 02-06-2017, 07:47 AM
  5. Excel spreadsheet holiday to Outlook Shared Calendar and update spreadsheet
    By tigerdel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-25-2012, 06:04 AM
  6. Excel Macro - Linking dates from Excel to a Shared Outlook Calendar
    By cg7131 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-17-2011, 11:08 AM
  7. Getting same locations In Shared Calendar
    By L_ter in forum Outlook Formatting & Functions
    Replies: 1
    Last Post: 04-15-2009, 05:19 AM

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