SharePoint中的VBA MKDIR失败 [英] VBA MKDIR in SharePoint fails
问题描述
这是我的问题:
我正在尝试在SharePoint共享文档库中建立一个文件夹.但是,只有在我使用使用Windows资源管理器打开"菜单项输入凭据后,该功能才起作用.
I am trying to make a folder in a SharePoint shared document library. But it only works after I enter my credentials using the "open with windows explorer" menu item.
如果我告诉他们他们首先需要这样做,我的用户将无法理解.因此,我的问题是:(A)是否有办法从VBA强制此凭据弹出窗口?(B)是否可以通过VBA传递这些凭据
My users will not understand if I tell them they need to do this first. So, my questions is either: (A) is there a way to force this credential popup from VBA OR... (B) is there a way to pass these credentials through VBA
myWorkbookBasePath= "\\sharepoint.buckeye.com\sites\transportation\cc\pipelineoperationreports\Shared%20Documents\" & folder
MkDir myWorkbookBasePath
推荐答案
如果可以通过编程方式提供它们,将使用哪些凭据?如果可以回答,则可以尝试如下操作:
What credentials would you use if you could provide them programmatically? If you can answer that, you could try something like this:
Set objNetwork = CreateObject("WScript.Network")
objNetwork.MapNetworkDrive "Z:", "\\server\share", False, strUser, strPwd
MkDir "Z:\NewFolder"
...
objNetwork.RemoveNetworkDrive "Z:"
这篇关于SharePoint中的VBA MKDIR失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!