SharePoint 中的 VBA MKDIR 失败 [英] VBA MKDIR in SharePoint fails

查看:17
本文介绍了SharePoint 中的 VBA MKDIR 失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的问题:

我正在尝试在 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.comsites	ransportationccpipelineoperationreportsShared%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:", "\servershare", False, strUser, strPwd

MkDir "Z:NewFolder"
...
objNetwork.RemoveNetworkDrive "Z:"

这篇关于SharePoint 中的 VBA MKDIR 失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆