Is there any code that will pull in all items listed on a recurring event that has a future start date? We have created a Calendar List for each of our clients with recurring tasks that the payroll processor uses to complete their daily work, we are trying to pull the reorts to see what was completed and what wasn't and the only thing that shows is what they have completed (they click on the calendar task and click Edit Item to complete).

The code below that I got off of your site works, but it will only pull in the items that have been touched.

Sub ImportSharePointList()

Dim objMyList As ListObject
Dim objWksheet As Worksheet
Dim strSPServer As String
Const SERVER As String = "mysite:8003/sites/the-sharepoint-thing/"
Const LISTNAME As String = "{D1F1C2ED-81BA-41CC-A698-XXXXXXXXXXXX}"
Const VIEWNAME As String = "{27C9CA20-3293-4BD5-9271-XXXXXXXXXXXX}"

' The SharePoint server URL pointing to ' the SharePoint list to import into Excel. strSPServer = "http://" & SERVER & "/_vti_bin" ' Add a new worksheet to the active workbook. Set objWksheet = Worksheets.Add ' Add a list range to the newly created worksheet ' and populated it with the data from the SharePoint list. Set objMyList = objWksheet.ListObjects.Add(xlSrcExternal, _ Array(strSPServer, LISTNAME, VIEWNAME), False, , Range("A1"))

End Sub

1 Answer 1


In this case the code is pulling list items from particular list VIEW (Const VIEWNAME As String = "{27C9CA20-3293-4BD5-9271-XXXXXXXXXXXX}"). If you have permissions to this list to create views, you can create custom list view that meets your business needs, get the GUID (example: {27C9CA20-3293-4BD5-9271-XXXXXXXXXXXX}) from your newly created view (can be done with SharePoint Manager 2010/2013) and replace it in the code so it would pull the items listed in the new custom list VIEW.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.