Set MyForm to the item Form Description for publishing. FormDescription ' Name the form, which also sets its message class. PublishForm olFolderRegistry, MyFolder ' Close and do not save changes to the item. Next Typically these approaches are used to loop through all of the items in a folder. The Items collection contains all of the items in a particular folder and you can specify which item to reference by using an index with the Items collection.
Next programming construct to loop through the items in the collection without specifying an index.
Both approaches achieve the same result. Automation code example. Set MyFolder to the default contacts folder. Get the number of items in the folder. Count ' Set MyItem to the collection of items in the folder.