prezbotyrion Posted September 13, 2017 Report Share Posted September 13, 2017 Hi All, Hoping someone can help with this ongoing headscratcher I am dealing with. Currently I have a shared macro for business data that saves and appends all data to an Excel CSV file. People can use the macro on their own profiles and it will still save their data to our shared CSV. We are losing our shared drive and being moved to Google Drive, so this is where the problem comes in. I use Variable Modify String: Append > Variable Modify String: Append to Text File. Filename is the path to the CSV in our Group drive. We have all synced our Google Drive to our profiles so I am amble to create a file path that is similar, however this part is different for each user, and looks like so: C:\Users\USERNAME\Google Drive\Folder A\Folder B\Shared Excel Data File.csv The username is obviously different for each person, so one might say: C:\Users\Bill\Google Drive\Folder A\Folder B\Shared Excel Data File.csv C:\Users\Adam\Google Drive\Folder A\Folder B\Shared Excel Data File.csv Is there a way to apply the environment variable automatically so that we can still make global changes without having colleagues import a new macro with each update? For example, can I have a constant environment variable like USERPROFILE, which is C:\Users\USERNAME\ on our systems? Then have it somehow combined with the remaining path Google Drive\Folder A\Folder B\Shared Excel Data File.csv ? Sorry, that was long-winded, and hopefully it makes sense, but any help is greatly appreciated! Thank you! Quote Link to comment Share on other sites More sharing options...
amonaghan Posted September 17, 2017 Report Share Posted September 17, 2017 You might want to have a look at this:- https://www.pcworld.com/article/3223136/data-center-cloud/google-drive-is-being-replaced-by-backup-and-sync-what-to-expect.html Quote Link to comment Share on other sites More sharing options...
Samrae Posted September 18, 2017 Report Share Posted September 18, 2017 Something like this may work: Set Variable %T1% to "Path to My Documents" Replace "\Documents" with "\Google Drive\Folder A\Folder B\Shared Excel Data File.csv" in %T1% Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.