VBA Dir on SharePoint -why working only with Internet Explorer? - vba

I wanted to map some folders on SharePoint and create new subfolders via VBA. The SharePointURLtoUNC function found here was really useful but there was another prerequisite for making all kinds of Dir commands work: I had to log in under Internet Explorer into SharePoint. It didn't work when I was only logged in under Chrome or Microsoft Edge.
Could you please explain why is it so and how to avoid Internet Explorer login?

According to your description, you want to know how to implement map a network drive to SharePoint, right? If this is the case, the issue you are experiencing is the correct behavior.
When you're mapping a network drive to a SharePoint document library:
The steps that require a web browser must be performed in Internet Explorer (version 10 or 11).
A mapped drive is only available when you're online.
Performance depends on connectivity speed.
To maintain the mapped network drive after it's established, you should periodically (say, every two weeks) navigate to the SharePoint library in Internet Explorer. This action refreshes an underlying "security token" that gives you permission to have the network drive mapped to the online library.
In addition, it's important to note that this is legacy technology and it may be affected by the deprecation of Internet Explorer in August 2021. For more details. please refer to this doc: Map a network drive to a SharePoint library.

Related

How do some sites automatically open in Edge when tried to open in IE11?

When I try to browse to netflix.com (for example) in IE11 (on Windows 10), IE11 shows a page with the title "We recommend viewing this website in Microsoft Edge", and the site automatically gets opened in Edge.
Does anyone know how that works? Is it done via an internally compiled list of sites or something I can set up on my website?
Thanks
You had asked, "Does anyone know how that works? Is it done via an internally compiled list of sites or something I can set up on my website?"
When a user goes to a site that is incompatible with Internet Explorer, they will be automatically redirected to Microsoft Edge. For more detailed information, you can refer to the Redirection from Internet Explorer to Microsoft Edge for compatibility with modern web sites.
Microsoft maintains a list of all sites that are known to be incompatible with Internet Explorer. You can view the site list here. If you want to add your site to the incompatible site list then you can refer to the Request an update to the IE compatibility list.
The MS Edge 87 or greater browser installs the BHO named IEToEdgeBHO that performs the redirection based on IE compatibility list from IE to Edge browser.
You can find this BHO at the location below on your machine.
C:\Program Files (x86)\Microsoft\Edge\Application\<Your_browser_version>\BHO
If you want to achieve something similar using the code in your own site then you can refer to the example on this answer. The test shows results for the Edge legacy browser but it can also work with the Edge (Chromium) browser.
Note: that the example code mentioned in the answer may break when the Edge browser is not installed on the machine. so you can try to modify the example to handle that kind of situation.
Helpful reference:
What “magic” causes “cnn.com” when typed in IE11 to automatically launch Edge (Chromium)?
Netflix specifically is on a list of websites that automatically open in Edge when they are accessed from Internet Explorer. The list is maintained by Microsoft.
If you do not want to go through the application process to get your website added to this list, you can resort to detecting which browser the user is on and handling the notice yourself.
Here is a decent list of current Internet Explorer user agents.

OneDrive UNC paths

This is not supported but does anyone know how to force OneDrive for Business use UNC paths?
I've spoke with MS and its not on their roadmap and they arent forth coming with a solution.
This is how we rank the feature request among the community, post your feature in user voice and MS will identify the priority of the feature based on the voting numbers.
Here is the user voice for office 365 website:
https://office365.uservoice.com/
Hope this helps.
It is supported. Same format as it is for SharePoint Online document library mappings. \tenant-my.sharepoint.com\personal\username\Documents
Connect as Web Drive: https://tenant-my.sharepoint.com/personal/username/Documents
The option is only hidden in the OneDrive simplified UI. You can even turn it on by adding a normal view to the Documents library and turning the ribbon on from Settings (note that of course open in Explorer only shows in IE).
Open in Explorer from OneDrive

SharePoint 2013 Performance Point

Dashboard designer error:
The url is not available,does not reference a sharepoint site, or you
do not have permission to connect
This is happening to the site collections under one web application only in the whole Farm. Other web applications are working fine and I can open site collections through dashboard designer.
Any suggestions????
Unattended acc is all set, Site feature is activated, site collection is added to trusted location. On database side, app pool acc has db owner access to web app db. PPS is db owner there as well.
I think this indicates to a deployment issue on this app. Maybe something went wrong when deploying webparts, the assemblies couldnt be registered or were not copied correctly. It could also be a specific access restriction issue in SharePoint or in the file system that SharePoint relies on.
Without any log information it is hard to say what is really the problem - but - have a look at windows event log for any further indications, the general log files that sharepoint/asp.net write or also consider using monitoring tools that can tell you more details on what is happening here.
I recently wrote a blog on top deployment mistakes in SharePoint. I highlight exactly these deployment mistakes in more details: Link
Andi

Move Access Web Database to Another Sharepoint Site

I have an Access web database (the out-of-the-box Project one) and plan to move to another Sharepoint site (a test server). I have done lots of googling and nothing comes up. Any pointers will be greatly appreciated.
Thanks.
After some trials and errors, I figured out how to do that. First open the Access web db in Access client. Then go to Publish & Save, where you should see an option Save As Local Database. Then open the local database, again go to Publish & Save, you can choose to Publish to Access Services. A pane will appear to let you enter the URL of Sharepoint server and site name. If you have customizations or lots of lookups, there's a good possibility it will not publish. If that's the case, you just need to fix all the errors reported.
I was able to move my Access 2016 app to a new Sharepoint Site by saving it as a .app and uploading it to the new site.
I found this link to Microsoft's site helpful: Create an Access app package

Error Trying to Save from Excel to Sharepoint Library

I am trying to save an Excel 2010 file to a Sahrepoint 2010 document library but keep getting the error:
"You can't open this location using this program. Please try a different location"
Googling this suggests enabling "Desktop Experience" on the server which I have done. All Excel services are activated.
Has anyone come across this and been able to resolve successfully? I am wondering if this is more security related but the security set-up looks fine.
Any suggestions?
Thanks
I think that there are potentially a couple of things that could solve this problem depending on your set-up.
You are right that a lot of internet advice is to enable desktop experience, but if you are not running on the server or if you have already done this then one of the suggestions below could help.
This is only for dev environments however.
If you are running on the server and trying to use your app as admin then configuring IE ESC to turn off enhanced security for Admins should help
If you are running off server and have the issue and do not want to turn off IE ESC (on the server) for users then you need to enable a mechanism to allow auto-logon, either through integrated security (i.e. you are part of the domain), accessing through an anon web-site port on your SharePoint app (set-up anon web access in SharePoint) or set up and store a WebDav link and use that as the open/save URL.
My (unconfirmed) theory is that there is some auto-login going on in the background that hinders a streamlined office integration. Most of the time, SharePoint will be set up with Kerberos (not NTLM) or be in anon mode so enabling desktop experience if running on the server will be the best first step to try.
Hope this helps.
The problem is that the full path to the file is too long.
I had this problem with a PowerPoint presentation. The full path to the file was over 275 characters. When I shortened the file name to bring the full path under 250 characters, I was able to open the file normally.