GCuser99 / SeleniumVBA

A comprehensive Selenium wrapper for browser automation developed for MS Office VBA running in Windows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fix for Excel files on OneDrive non-sync folder

6DiegoDiego9 opened this issue · comments

commented

My mostly used VBA library is now in a non-synchronized OneDrive folder:
its path is like "https://d.docs.live.net/e25ab468b5ac3843/NonSyncFoobar/filename.xlam"
and I open/save it directly from/to that URL path.

I chose that because I found it's the only or at least the most reliable way to work on it from multiple PC (home + work + remote VPS) without out-of-sync issues or sync conflicts with each PC's locally synchronized file.

However, our GetLocalOneDrivePath function isn't aware of the exclusion from sync, so it returns a non existent local path like:
C:\Users\myname\OneDrive\NonSyncFoobar

In order to fix the error raised from GetFullLocalPath (second screenshot, before my mod) because of that, I applied a couple of quick dirty mods on my code:

GetLocalOneDrivePath :
image

GetFullLocalPath:
image

I didn't commit them, as I didn't check all the uses you do of the local path (now a local-if-available path), especially after your .INI addition.
I am willing to assist in testing any proposed solutions you have.

commented

Hi Diego,

Let me do some testing with those changes just to be sure. But at first glance, I'm pretty sure that the new ini functionality will not be affected - the only change I made to GetFullLocalPath was to add the ExpandEnvironVariable function.

BTW, do you have an email address that you can include in your GitHub profile? To protect my privacy, I added a GCUser999@gmail.com to my profile. If you had one, then we could chat offline if we ever need to. Just a suggestion, if that works for you.

Thanks!

commented

Email address: added, you're welcome :)

commented

@6DiegoDiego9, I finished testing and your mods above cause no problem for me (I'm not on OneDrive though).

Unless you have more changes than the OneDrive mods, then let me make the commit because I have the geolocation methods to commit as well.

commented

Ok!