FormDescription.PublishForm Method
Outlook Developer Reference |
Saves the definition of the FormDescription object in the specified form registry (library).
Syntax
expression.PublishForm(Registry, Folder)
expression A variable that represents a FormDescription object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
Registry | Required | OlFormRegistry | The form class. |
Folder | Optional | Variant | Expression that returns a Folder object. Used only with Folder form registry. The folder object from which the forms must be accessed. |
Remarks
Note |
---|
The Name property must be set before you can use the PublishForm method. |
Forms are registered as one of three classes: Folder, Organization, or Personal. The Folder form registry holds a set of forms that are only accessible from that specific folder, whether public or private. The Organization form registry holds forms that are shared across an entire enterprise and are accessible to everyone. The Personal form registry holds forms that are accessible only to the current store user.
Example
This Visual Basic for Applications (VBA) example creates a contact, obtains its FormDescription object, and saves it in the Folder form registry of the default Contacts folder.
Note |
---|
The PublishForm method will return an error if the caption (Name) for the form is not set first. |
Visual Basic for Applications |
---|
|
This VBA example creates an appointment, obtains its FormDescription object, and saves it in the user's Personal form registry.
To view the form after you have published it, on the File menu, point to New, and click Choose Form. In the Look in box, click Personal Forms Library. To open your new form, double-click Interview Scheduler.
Visual Basic for Applications |
---|
|
See Also