FormDescription.PublishForm (Outlook)
Saves the definition of the FormDescription object in the specified form registry (library).
PublishForm (Registry, Folder)
Sub PublishToFolder()
Dim myNamespace As Outlook.NameSpace
Dim myFolder As Outlook.Folder
Dim myItem As Outlook.ContactItem
Dim myForm As Outlook.FormDescription
Set myNamespace = Application.GetNamespace("MAPI")
Set myFolder = _
myNamespace.GetDefaultFolder(olFolderContacts)
Set myItem = Application.CreateItem(olContactItem)
Set myForm = myItem.FormDescription
myForm.Name = "My Contact"
myForm.PublishForm olFolderRegistry, myFolder
End Sub
Arguments
The following argument is required
Registry (OlFormRegistry) - The form class.
Possible values are
olDefaultRegistry | The Form is registered in the user's default form registry. |
olFolderRegistry | The Form is registered in a form registry specific to a particular folder, and can only be accessed from that folder. |
olOrganizationRegistry | The Form is registered in the organizational form registry. The form is available to all users. |
olPersonalRegistry | The Form is registered in the user's personal registry and is only accessible to that user. |
Optional arguments
The following argument is optional
Folder (Folder) - Expression that returns a Folder object. Used only with Folder form registry. The folder object from which the forms must be accessed.