如何使用vba获取sharepoint文件夹中存在的文件名列表 [英] how to get the list of filenames present in a sharepoint folder using vba

查看:350
本文介绍了如何使用vba获取sharepoint文件夹中存在的文件名列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想获取sharepoint文件夹中所有文件的名称。

I would like to get the names of all the files present in a sharepoint folder.

可以任意你们这些伙伴们帮助我......

can any of u guys help me asap plz...

真的很难听到破碎......

its really hard and heard breaking..

推荐答案

第一步是将驱动器指示符(Z :)映射到SharePoint文件夹。 例如:

The first step is to map a drive designator (Z:) to your SharePoint folder.  For example:

http:// sharepoint.microsoft.com/Blogs/GetThePoint/Lists/Posts/Post.aspx?ID=465

有关如何完成此操作的其他资源,只需Google 映射驱动器SharePoint

For other resource on how to accomplish this, just Google mapped drive SharePoint

下一步是使用DIR,例如在Excel环境中:

The next step is to use DIR, for example in an Excel environment:

Sub SimpleFileLister()

Dim s As String,FileName As String

Cells.Clear

s =" Z:\\ \\ *。*"
$
FileName = Dir(s)

Do Until FileName =""

    i = i + 1

   单元格(i,1).Value = FileName

    FileName = Dir()

循环

结束子

Sub SimpleFileLister()
Dim s As String, FileName As String
Cells.Clear
s = "Z:\*.*"
FileName = Dir(s)
Do Until FileName = ""
    i = i + 1
    Cells(i, 1).Value = FileName
    FileName = Dir()
Loop
End Sub


这篇关于如何使用vba获取sharepoint文件夹中存在的文件名列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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