Add Method (Pages Collection)
Applies To
Pages collection object.
Description
Creates a new page in the Pages collection, and returns the new page. The Pages collection is initially empty and there is a limit of 5 customizable pages per collection.
Syntax
expression.Add(Name)
expression An expression that returns a Pages object.
Name Required String. The name of the page.
Example
This example returns a new custom page named "My Page" (the same call without a name will return the next available page for customization — for example, "Custom1").
Set myPages = myItem.GetInspector.ModifiedFormPages
Set myPage = myPages.Add("My Page")
This example returns the Message page of a MailItem.
Set myItem = myOlApp.CreateItem(olMailItem)
Set myPages = myItem.GetInspector.ModifiedFormPages
Set myPage = myPages.Add("Message")
This example returns the General (main) page of a ContactItem.
Set myItem = myOlApp.CreateItem(olContactItem)
Set myPages = myItem.GetInspector.ModifiedFormPages
Set myPage = myPages.Add("General")