Excel VBA and shared calendar issue

Samboco

New Member
Outlook version
Outlook 2016 64 bit
Email Account
Office 365 Exchange
Hi,

New to this forum, my apologies if this has been covered elsewhere. I'm also pretty new to VBA so I've been struggling to see how I would adapt my script.

I have an excel workbook that I use to create a staff work rota. I've built this to compile a list of events for each staff member that when my VBA script runs adds these in to an individual outlook calendar, I then publish these calendars so that each staff member can subscribe to their own unique work calendar. These calendars are created in my outlook account. When I run the script, everything works as intended. However, when another member of the management team runs the script it does not work. I have shared the calendars with the other managers and set their permission level as publishing author (which I thought would give them sufficient access) but still the script does not work.

I'm hoping that someone can spot the error in my VBA and give me the correct solution or if it's not the script, advise what I need to do in outlook for it to work.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
When I run the script, everything works as intended. However, when another member of the management team runs the script it does not work. I have shared the calendars with the other managers and set their permission level as publishing author (which I thought would give them sufficient access) but still the script does not work.
They are using the exact same script? The calendars are shared to both of you or are they in your mailbox and you share the finished product out?

Best guess - it's how the calendars are referenced when run from a difference machine.
 

Samboco

New Member
Outlook version
Outlook 2016 64 bit
Email Account
Office 365 Exchange
They are using the exact same script? The calendars are shared to both of you or are they in your mailbox and you share the finished product out?

Best guess - it's how the calendars are referenced when run from a difference machine.
HI Diane,

Thanks for replying. They are using the same script and the calendars are in my mailbox which I then share out.
How would I amend my script so that it takes in ta account the different referencing when someone else runs it?
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
See Working with VBA and non-default Outlook Folders

If the shared calendars are subfolders of your calendar, you need to do it like this:
Set newCalFolder = NS.GetSharedDefaultFolder(objOwner, olFolderCalendar)
Set sharedCalA = newCalFolder.Folders("sub calendar A")
Set sharedCalB = newCalFolder.Folders("sub calendar B")
 
Similar threads
Thread starter Title Forum Replies Date
O Email not leaving Outbox when using Excel VBA to sync Outlook account Outlook VBA and Custom Forms 4
B Outlook Business Contact Manager with SQL to Excel, User Defined Fields in BCM don't sync in SQL. Can I use VBA code to copy 1 field to another? BCM (Business Contact Manager) 0
S Find a cell value in excel using outlook vba Using Outlook 1
O VBA to extract email (fields and body) to Excel Outlook VBA and Custom Forms 14
P Outlook 2016 from Excel 2016 VBA Using Outlook 1
N VBA Outlook reference to Excel and assigning category Outlook VBA and Custom Forms 13
Z Default VBA code for extracting data from email (Outlook) to Excel? Outlook VBA and Custom Forms 1
D Outlook VBA to open Excel attachment and send recipient's email address to a workbook cell? Using Outlook 4
M using Folders.Count in Excel Vba Outlook VBA and Custom Forms 8
J vba to get email name , subject and attachements on excel list Outlook VBA and Custom Forms 2
S Requried a VBA Code to export Calander details to excel... Outlook VBA and Custom Forms 4
M VBA Send Sales reports using .oft files, originate in Outlook or Excel? Using Outlook 5
B Excel 2010 vba to post appts to different outlook calendars at the same time Using Outlook 6
C Open/Close Outlook - Via Excel VBA Using Outlook 2
S Email Help: Sending Outlook email from Excel VBA Outlook VBA and Custom Forms 6
W Using Excel UserForm from Open Workbook in Outlook VBA Outlook VBA and Custom Forms 5
H add an appointment for a custom calendar, vba excel Outlook VBA and Custom Forms 2
M can't access outlook contacts from excel via VBA Outlook VBA and Custom Forms 4
H Information from user defined field into Excel Outlook VBA and Custom Forms 7
N Extract Outlook emails to excel Outlook VBA and Custom Forms 2
M Extract all links from Outlook email, send to Excel Using Outlook 2
C Pull Outlook shared calendars items from Excel Outlook VBA and Custom Forms 4
S How to export urls from email to excel and check the status of the url ? New Slipstick.com Articles 6
S save email from excel Outlook VBA and Custom Forms 1
C Trying to populate an appointment ComboBox from Excel Outlook VBA and Custom Forms 2
M Auto-export mail to Excel Outlook VBA and Custom Forms 2
E Accessing shared outlook folder doesn't work since switch to new outlook/excel Outlook VBA and Custom Forms 11
E Copying the whole e-mail body into excel Outlook VBA and Custom Forms 0
E Copy e-mail body from outlook and insert into excel Outlook VBA and Custom Forms 3
E Copying data from e-mail attachement to EXCEL file via macro Outlook VBA and Custom Forms 38
K Update Appointment category when changed in Excel Using Outlook 3
A Script to fetch data from mails in restricted collection and sending them to excel Using Outlook 1
D Paste Excel table into Outlook message Outlook VBA and Custom Forms 8
J Outlook 2013 Extract Flag Completed dates to Excel Macro Outlook VBA and Custom Forms 16
D Retrieving Tables from outlook to excel Using Outlook 14
J Copy or Export Outlook Mail to Excel Outlook VBA and Custom Forms 6
nathandavies Email Details to Excel & Save as .MSG on one macro - combination of 2 macros Outlook VBA and Custom Forms 3
N Export details to a excel spreadsheet using macros Using Outlook 0
P How to copy and append data from Outlook 2016 message into Excel 2016 workbook Using Outlook 0
T Outlook Calendar 2016 import Excel Using Outlook 1
D Macro sending outlook template from Excel list Outlook VBA and Custom Forms 6
N Lookup Value From Excel and Reply With Matching Value Using Outlook 0
D send email from Excel using outlook template Outlook VBA and Custom Forms 3
Diane Poremsky Importing Lists from Excel to Outlook New Slipstick.com Articles 0
N Paste content to Excel when .txt file (attachment) is opened Outlook VBA and Custom Forms 1
R Macro to copy email to excel - Runtime Error 91 Object Variable Not Set Outlook VBA and Custom Forms 11
M Creating Outlook Appointments from Excel Cells Outlook VBA and Custom Forms 1
M Linking Excel Cell to Shared Contacts Outlook VBA and Custom Forms 7
H Macro to Copy Specific content from Mail Body and Paste to Excel Outlook VBA and Custom Forms 4
R Exporting Excel data to Outlook 2016 Calendar Outlook VBA and Custom Forms 20

Similar threads

Top