5/25/2023 0 Comments Unc onedrive![]() Set ShellScript = CreateObject("WScript.Shell") On Error Resume Next 'invalid or non existin registry keys check would evaluate error Private Function strOneDriveLocalFilePath() As String Simply call it from another sub or function to obtain the file path. The code checks all instances of OneDrive in the system and verify if file is there. In case your OneDrive folder is not in default location, the code below will allow you to locate the file wherever it is. StrRetVal = Replace(strRetVal, "/", "\") 'slashes in the right direction StrRetVal = RegKeyRead("HKEY_CURRENT_USER\Environment\OneDrive")
0 Comments
Leave a Reply. |