抑制窗口安全警告消息
我正在寻找方法来检查文件是否存在于SharePoint位置。我使用的是执行此操作的功能,但是一个消息框,标题为“ Windows安全警告”,并带有消息:“此页面正在访问其无法控制的信息。这构成了安全风险。您想继续吗?”
这是我使用的功能:
Public Function SP_File_Exists (URLString as String) as Boolean
Dim oHttPRequst as Object
if Len(Trim(URLString)) =0 Then
SP_File_Exists = False
Exit Function
Set oHttpRequest = CreateObject("MSXML2.XMLHTTP.6.0")
With oHttpRequest
.Open "GET", URLString, False
.Send
End With
If oHttpRequest.Status = 200 Or Left(oHttpRequest.Status, 1) = 3 Then ' '300 to accommodate redirects
SPFile_Exists = True
Else
SPFile_Exists = False
End If
End Function
有没有办法抑制消息?我尝试使用DisplayAlerts属性,但它不起作用。我希望有人征服了这个问题。
I am looking for way to check if files exist in a SharePoint location. I am using a function that performs this action but a message box titled: Windows Security Warning, with the message "This pages is accessing information that is not under its control. This poses a security risk. Do you want to continue?"
Here is the function I am using:
Public Function SP_File_Exists (URLString as String) as Boolean
Dim oHttPRequst as Object
if Len(Trim(URLString)) =0 Then
SP_File_Exists = False
Exit Function
Set oHttpRequest = CreateObject("MSXML2.XMLHTTP.6.0")
With oHttpRequest
.Open "GET", URLString, False
.Send
End With
If oHttpRequest.Status = 200 Or Left(oHttpRequest.Status, 1) = 3 Then ' '300 to accommodate redirects
SPFile_Exists = True
Else
SPFile_Exists = False
End If
End Function
Is there a way to suppress the message? I have tried using DisplayAlerts property and it doesn't work. I am hopeful that someone has conquered this problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论