I am trying to write some code to get me a list of files in a folder. The folder will always sit in the same folder as my Powerpoint presentation. When I use activepresentation.path to get the name of the directory that the powerpoint sits in, I get this:
https://*companyName*-my.sharepoint.com/personal/chaag_*companyName*_com/Documents/tomFoolery/MAG Presentation
If I use CurDir() I get this:
C:\Users\chaag\Documents
The path that I want is this:
c:/users/chaag/onedrive - *companyName*/tomFoolery/MAG Presentation
My issue is that I am using
to loop through files in the folder and give me their names, but with the sharepoint address it does not work. I am happy with any solutions to allow me to use the sharepoint address or that can give me actual path on my computer
https://*companyName*-my.sharepoint.com/personal/chaag_*companyName*_com/Documents/tomFoolery/MAG Presentation
If I use CurDir() I get this:
C:\Users\chaag\Documents
The path that I want is this:
c:/users/chaag/onedrive - *companyName*/tomFoolery/MAG Presentation
My issue is that I am using
VBA Code:
Dir("c:/users/chaag/onedrive - Mid American Group/tomFoolery/MAG Presentation/photos/")