The AddItem method creates an instance of an Item class, adds the corresponding IItem dispinterface to the Items collection, and returns the interface.
VBScript Syntax
IChannel.AddItem
Parameters
None
Return Value
The IItem dispinterface (VT_DISPATCH)
Remarks
The AddItem method is the easiest way to quickly add an Item object's dispinterface to the Channel.Items collection. The same thing is accomplished by instantiating an Item object and explicitly adding the interface to the Items collection.
Example
VBScript and Windows Scripting Host
' Long method
Set IDispItem = CreateObject("Push.Item")
Set IDispChannel = CreateObject("Push.Channel")
IDispChannel.Items.Add IDispItem
' Short method
Set IDispChannel = CreateObject("Push.Channel")
IDispChannel.AddItem
See Also