I have a form that I convert to PDF and Dir() to a sharepoint online group. Periodically, my connection errors and I have to go into to sharepoint and click “View in File Explorer” under “all Documents” in my document library to reestablish the ability to upload files. I made a sub to open sharepoint in file explorer via Shell method, but it only functions if I, you guessed it, click on “View in File Explorer”. Can anybody either A, help with a work around other than opening the page and click “View…” or B how to actually click the button? I cycle through the elements, but the button I want doesn’t appear. I constantly get object required or object not set errors. Please let me know if you need more info.
[View of DropDown]
Here is the html for All Documents
Sub filexplorer2() Dim IE As New SHDocVw.InternetExplorerMedium Dim HTMLDoc As MSHTML.HTMLDocument With IE .Visible = True .navigate "https://nov.sharepoint.com/teams/WBTuboscopeCoatingEngineering/POR Requests/Forms/AllItems.aspx" Do Until .ReadyState = 4: DoEvents: Loop End With Set HTMLDoc = IE.Document HTMLDoc.getElementsByClassName("ms-ContextualMenu-link root-453").Click Set IE = Nothing Set HTMLDoc = Nothing End Sub