Vbscript Fehlercode: Object required
Guten Morgen
seh vor lauter Bäume den Wald nicht mehr!
bei Ausführen des Cods kommt folgende Fehlermeldung: Line:9
Char:1
Error: Object requred: 'Groups'
Code: 800A01A8
Besten Dank für Hilfe
seh vor lauter Bäume den Wald nicht mehr!
bei Ausführen des Cods kommt folgende Fehlermeldung: Line:9
Char:1
Error: Object requred: 'Groups'
Code: 800A01A8
Set xmlDoc = CreateObject("MSXML2.DOMDocument.6.0")
xmlDoc.async = False
xmlDoc.load("C:\zATi\AutogenDescriptions.xml")
Set xmlRoot = xmlDoc.documentElement
Set nodeInsert = xmlDoc.selectSingleNode("//Autogen.AutogenGroupings")
Set rootElement=xmlDoc.createElement("Groups.Grouping")
Set Groups.GroupingAttribute=xmlDoc.createAttribute("id")
Set Groups.GroupingAttributeText=xmlDoc.createTextNode("{xxxxxxx}")
Groups.Grouping.appendChild(Groups.GroupingAttributeText)
RootElement.setAttributeNode(Groups.GroupingAttribute)
Set objFieldValue = _
xmlDoc.createElement("ATi")
objFieldValue.Text = "_Follunga"
rootElement.appendChild objFieldValue
Set objRecord = xmlDoc.createElement("ReferenceEntry")
Set objFieldValue = _
xmlDoc.createElement("TargetGuid")
objFieldValue.Text = "xxxxxxxxxxxxx"
objRecord.appendChild objFieldValue
Set objFieldValue = _
xmlDoc.createElement("RelativeWeight")
objFieldValue.Text = "xxxxxxxxxxxx"
objRecord.appendChild objFieldValue
rootElement.appendChild objRecord
nodeInsert.appendChild rootElement
Set objRecord = xmlDoc.createElement("ReferenceEntry")
Set objFieldValue = _
xmlDoc.createElement("TargetGuid")
objFieldValue.Text = "xxxxxxxxxx"
objRecord.appendChild objFieldValue
Set objFieldValue = _
xmlDoc.createElement("RelativeWeight")
objFieldValue.Text = "xxxxxx"
objRecord.appendChild objFieldValue
rootElement.appendChild objRecord
nodeInsert.appendChild rootElement
Set objRecord = xmlDoc.createElement("ReferenceEntry")
Set objFieldValue = _
xmlDoc.createElement("TargetGuid")
objFieldValue.Text = "xxxxxxxxxxxxxxxxxxx"
objRecord.appendChild objFieldValue
Set objFieldValue = _
xmlDoc.createElement("RelativeWeight")
objFieldValue.Text = "xxxxx"
objRecord.appendChild objFieldValue
rootElement.appendChild objRecord
nodeInsert.appendChild rootElement
Set objRecord = xmlDoc.createElement("ReferenceEntry")
Set objFieldValue = _
xmlDoc.createElement("TargetGuid")
objFieldValue.Text = "xxxxxxxxxxxxxxxx"
objRecord.appendChild objFieldValue
Set objFieldValue = _
xmlDoc.createElement("RelativeWeight")
objFieldValue.Text = "xxxxxxxx"
objRecord.appendChild objFieldValue
rootElement.appendChild objRecord
nodeInsert.appendChild rootElement
Set objRecord = xmlDoc.createElement("ReferenceEntry")
Set objFieldValue = _
xmlDoc.createElement("TargetGuid")
objFieldValue.Text = "xxxxxxxxxxxx"
objRecord.appendChild objFieldValue
Set objFieldValue = _
xmlDoc.createElement("RelativeWeight")
objFieldValue.Text = "xxxxxxx"
objRecord.appendChild objFieldValue
rootElement.appendChild objRecord
nodeInsert.appendChild rootElement
Set objRecord = xmlDoc.createElement("ReferenceEntry")
Set objFieldValue = _
xmlDoc.createElement("TargetGuid")
objFieldValue.Text = "xxxxxxxxxxxxxxx"
objRecord.appendChild objFieldValue
Set objFieldValue = _
xmlDoc.createElement("RelativeWeight")
objFieldValue.Text = "xxxxxxxxx"
objRecord.appendChild objFieldValue
rootElement.appendChild objRecord
nodeInsert.appendChild rootElement
Set objRecord = xmlDoc.createElement("ReferenceEntry")
Set objFieldValue = _
xmlDoc.createElement("TargetGuid")
objFieldValue.Text = "xxxxxxxxxxxxxxxx"
objRecord.appendChild objFieldValue
Set objFieldValue = _
xmlDoc.createElement("RelativeWeight")
objFieldValue.Text = "xxxx"
objRecord.appendChild objFieldValue
rootElement.appendChild objRecord
nodeInsert.appendChild rootElement
Set objRecord = xmlDoc.createElement("ReferenceEntry")
Set objFieldValue = _
xmlDoc.createElement("TargetGuid")
objFieldValue.Text = "xxxxxxxxxx"
objRecord.appendChild objFieldValue
Set objFieldValue = _
xmlDoc.createElement("RelativeWeight")
objFieldValue.Text = "xxxxx"
objRecord.appendChild objFieldValue
rootElement.appendChild objRecord
nodeInsert.appendChild rootElement
Set objRecord = xmlDoc.createElement("ReferenceEntry")
Set objFieldValue = _
xmlDoc.createElement("TargetGuid")
objFieldValue.Text = "xxxxxxxxxxxxxxxxxx"
objRecord.appendChild objFieldValue
rootElement.appendChild objRecord
nodeInsert.appendChild rootElement
xmlDoc.Save"C:\zATi\TestAutogenDescriptions.xml"
Set xmlDoc = Nothing
Bitte markiere auch die Kommentare, die zur Lösung des Beitrags beigetragen haben
Content-ID: 340492
Url: https://administrator.de/contentid/340492
Ausgedruckt am: 24.11.2024 um 09:11 Uhr
2 Kommentare
Neuester Kommentar