2011/04/17

access2010 SharePointリストをリンクする

Option Compare Database
Option Explicit

Sub SharePointList_Link()
    Dim tdf As TableDef
    Set tdf = CurrentDb.CreateTableDef("ListXX")
    tdf.Connect = "ACEWSS;HDR=NO;IMEX=2;" & _
                  "ACCDB=YES;" & _
                  "DATABASE=http://SharePointSiteURL;" & _
                  "LIST=ListName or ListGUID;" & _
                  "VIEW=ViewGUID;" & _
                  "RetrieveIds=Yes"
                  'IMEX=1 ReadOnly
    tdf.SourceTableName = "ListName"
    CurrentDb.TableDefs.Append tdf
    Application.RefreshDatabaseWindow
End Sub

0 件のコメント: