Hi
I'm building up some VBA based on Diane's examples in
http://www.slipstick.com/developer/create-appointments-spreadsheet-data/ and making good progress. I'm using Excel 2016 and Outlook 2016.
Diane's export VBA from Excel to Outlook works fine with a newly created local calendar under 'My Calendars' and I believe this code identifies the default calendar:
Set CalFolder = olNs.GetDefaultFolder(olFolderCalendar)
I now need to export my Excel data to a Shared Calendar which I have added from the Address Book into my new shared calendar located in 'Other Calendars' and require the 'Set CalFolder' code to identify this.
When I try to run without this reference to the correct shared calendar I get this error:
Microsoft Visual Basic
Run-time error '-2147221233 (8004010f)';
The attempted operation failed. An object could not be found.
and in debug it highlights this line of code:
Set subFolder = CalFolder.Folders(arrCal)
There must be a way of referencing the shared calendar I have added to 'Other Calendars' from the Address Book and any help is much appreciated.
Thanks
I'm building up some VBA based on Diane's examples in
http://www.slipstick.com/developer/create-appointments-spreadsheet-data/ and making good progress. I'm using Excel 2016 and Outlook 2016.
Diane's export VBA from Excel to Outlook works fine with a newly created local calendar under 'My Calendars' and I believe this code identifies the default calendar:
Set CalFolder = olNs.GetDefaultFolder(olFolderCalendar)
I now need to export my Excel data to a Shared Calendar which I have added from the Address Book into my new shared calendar located in 'Other Calendars' and require the 'Set CalFolder' code to identify this.
When I try to run without this reference to the correct shared calendar I get this error:
Microsoft Visual Basic
Run-time error '-2147221233 (8004010f)';
The attempted operation failed. An object could not be found.
and in debug it highlights this line of code:
Set subFolder = CalFolder.Folders(arrCal)
There must be a way of referencing the shared calendar I have added to 'Other Calendars' from the Address Book and any help is much appreciated.
Thanks