Folder Picker with SharePoint Link as default location (1 Viewer)

nidhinvkr

New member
Local time
Today, 01:39
Joined
Jun 5, 2022
Messages
6
Hi Friends,
I'm trying to open FolderPicker Dialog with the default location as the SharePoint folder.
I tried the below options in my code. But it didn't work. Instead it opens the local documents folder.
any help would be much appreciated.

I'm adding my code as screenshot. for some reason forum didn't allow me to include the code. When I did, there is notification says spam-like content.

code 2.png




code.png
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 18:39
Joined
Oct 29, 2018
Messages
21,358
One thing you could try is map the sharepoint folder to a drive letter and use that in your code instead. Do you know if the SharePoint admins enabled WebDAV on the SharePoint server?
 

nidhinvkr

New member
Local time
Today, 01:39
Joined
Jun 5, 2022
Messages
6
One thing you could try is map the sharepoint folder to a drive letter and use that in your code instead. Do you know if the SharePoint admins enabled WebDAV on the SharePoint server?
@theDBguy thanks for you response. I think WenDAV is enabled. when I follow the below address in the file explorer, it opens the folder.

Code:
"\\CompanyName.sharepoint.com@SSL\DavWWWRoot\sites\TestSite\Shared Documents\"
s1.png


I'm not intended to use the map drive. Because this front end access file will be used by our team members. So adding the map drive is a pain for them. So could you please advise is any other alternative?
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 18:39
Joined
Oct 29, 2018
Messages
21,358
My guess is that the file dialog functions just a little bit different than file explorer. Hopefully, someone else has another idea. If not, you might just instruct all users to use the same drive letter to map the sharepoint folder on their machines. Good luck!
 

nidhinvkr

New member
Local time
Today, 01:39
Joined
Jun 5, 2022
Messages
6
My guess is that the file dialog functions just a little bit different than file explorer. Hopefully, someone else has another idea. If not, you might just instruct all users to use the same drive letter to map the sharepoint folder on their machines. Good luck!
Can we Map SharePoint drive through VBA at the beginning and remove it in the end of the process?
Is there any problem with frequent connection/disconnection ?
 

Gasman

Enthusiastic Amateur
Local time
Today, 01:39
Joined
Sep 21, 2011
Messages
14,048
Wouldn't exactly be hard for a logon script to map a drive each time? if you cannot get to it any other way?
Ask your IT dept.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 18:39
Joined
Oct 29, 2018
Messages
21,358
Can we Map SharePoint drive through VBA at the beginning and remove it in the end of the process?
Is there any problem with frequent connection/disconnection ?
Yes, you can map a network drive using code, but there's a couple of potential problems with that idea.
1. What if the user already has the same drive letter mapped to a different resource, or
2. What if the user already has the same drive letter mapped to the same sharepoint folder and doesn't want it disconnected, because they use it for something else?
 

Users who are viewing this thread

Top Bottom