ThisWorkbook.FullName returns a URL after syncing with OneDrive. I want the file path on disk

This is corrected and restyled code from beerockxs. It works on my machine, but I’m not sure how well it’ll work on other setups. If others could test, that would be great. I’ll be marking beerockxs answer at the solution. Function GetLocalFile(wb As Workbook) As String ‘ Set default return GetLocalFile = wb.FullName Const HKEY_CURRENT_USER … Read more

Upload file to SharePoint drive using Microsoft Graph

In order to get all the files of a drive using v1.0, you would first need to get an access token (which I see you are already passed that), then get the ‘drive-id’ and use the following URL(note: its not ‘drive’ it is ‘drives’): https://graph.microsoft.com/v1.0/drives/{drive-id}/root/children To get the drive id, I made the following GET … Read more

Excel’s fullname property with OneDrive

I found a thread online which contained enough information to put something simple together to solve this. I actually implemented the solution in Ruby, but this is the VBA version: Option Explicit Private Function Local_Workbook_Name(ByRef wb As Workbook) As String Dim Ctr As Long Dim objShell As Object Dim UserProfilePath As String ‘Check if it … Read more