Macro to select form in Personal Forms Library

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello, I have Outlook 2003. I need to be able to write an Outlook macro (vba
code) to choose a form named "Memo" from the "Personal Forms Library". Can
anyone assist me with this code?

Thanks in advance!
 
Just add a new item to whatever folder has items of that type and use the
MessageClass property to select the correct custom MessageClass. If the form
is published that would work.
 
Let's say the form is a contact form. It has a custom MessageClass of
"IPM.Contact.MyForm". To open a new contact item using that form you could
do the following in an Outlook macro:

Sub OpenMyContact()
Dim oContact As Outlook.ContactItem
Dim oFolder As Outlook.MAPIFolder

Set oFolder = Application.Session.GetDefaultFolder(olFolderContacts)
Set oContact = oFolder.Items.Add("IPM.Contact.MyForm")
oContact.Display
End Sub
 
Back
Top