打开sharepoint文件而不检查

时间:2013-07-19 10:32:32

标签: sharepoint vbscript

我需要将现有系统链接到我们的sharepoint站点以检索文档。

我可以从网站上打开一个文件,但是当我这样做的时候,我会看到一个窗口,询问我是否要“退房”。打开'或只是'打开'。

如何在我的代码中设置此值,以便始终只打开文档而不检出。

这是我的代码:

Dim runFile
Dim rsDoc

Set rsDoc = CreateObject("ADODB.Recordset")
rsDoc.Open "Select xalFileName as Filename from DocumentLinks where xalReference = '"&Trim(controls("M1TextBox1").Value&"'"), Connection, adOpenStatic, adLockBatchOptimistic, adCmdText

If rsDoc.EOF Then
    Call App.MessageBox("The document code is not valid, please speak to Keith",vbInformation,"Data updated")

Else
    Do While Not rsDoc.EOF
        sFile = rsDoc.Fields("Filename")

        Set runFile = CreateObject("WScript.Shell")
            runFile.Run Chr(34) & sFile & Chr(34), 1, False
        Set runFile = Nothing

        rsDoc.MoveNext
        Loop
End If
rsDoc.Close

0 个答案:

没有答案