
'reads the value for the registry key i_RegKey (Also notice I did change some slashes stuff for what I wanted returned! Other than that works great! Thank you so much! I was using excel not word, so the registry grabber "System." did not work for me. StrRetVal = Replace(strRetVal, "%20", " ") 'a space is a space once more

StrRetVal = Replace(strRetVal, "/", "\") & "\" 'slashes in the right direction StrRetVal = System.PrivateProfileString("", "HKEY_CURRENT_USER\Environment", "OneDrive") & strRetVal 'read the "local part" from the registry and concatenate If Left(LCase(doc.Path), Len(strcOneDrivePart)) = strcOneDrivePart Then 'yep, it's the OneDrive pathīytSlashPos = InStr(Len(strcOneDrivePart) + 1, strRetVal, "/") 'return the local path for doc, which is either already a local document or a document on OneDriveĭim strRetVal As String, bytSlashPos As Byte Private Function GetDocLocalPath(doc As Document) As String I'm using Word 2016 but I'm pretty sure this can be done in Word 2013 and Word 2010 as well.

in which case I'll add my reply for anyone who's interested. It's been a while since you posted this so I suppose you don't need an answer any longer.
