Hi moorracr. Unfortunately, the code didn't end up being the solution to my particular database's issue after all, although it looked so promising.
My database issue appears to have related to the database needing to be logged into my Office365 account in order to link to the linked sharepoint...