I need a script to return the URL and TCM of every localised page with a specific schema based component on it and using a specific component template.

This is what I am trying to get a list of all the pages in a particular SG, But I get error:

Option Explicit
On Error Resume Next
Dim objTDSE
Set objTDSE = CreateObject("TDS.TDSE")

Dim objSG As Object
Set objSG= lObjTDSE.GetObject("tcm:12-110069-4")

Dim lObjRowFilter
Set lObjRowFilter = ObjTDSE.CreateListRowFilter() 
Call lObjRowFilter.SetCondition("ItemType", 64)
Call lObjRowFilter.SetCondition("Recursive", True)

Dim doc
Set doc = CreateObject("Microsoft.XMLDOM")
doc.async = false
doc.ValidateonParse = False
doc.resolveExternals = False

doc.LoadXml(objSG.getlistitems(15, lObjRowFilter) )
doc.save "D:\temp\Content Extract\SR3741354\PageList\ICP_CompList.xml"

If err.number <> 0 Then 
   MsgBox "Error : " & err.description
End If
MsgBox "Done !!"

set doc = Nothing 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.