
Setting values to Custom Fields on Custom Forms
Please help (again)
I have a custome Contacts Form. In it I have placed a combo and tex box,
cmbType and txtDX. I have also set these up as Custom fields, Type and DX as
text fields. The code below works fine to open up my customised form. How do
I set the values for Type and DX though?
Dim NameSpace As NameSpace
Dim mailFolder As Object
Dim mailItem As Object
Dim olApp As Outlook.Application
Dim objUserType As Object
Set olApp = New Outlook.Application
Set NameSpace = olApp.GetNamespace("MAPI")
Set mailFolder = NameSpace.GetDefaultFolder(olFolderContacts)
Set mailItem = mailFolder.Items.Add("IPM.Contact.My_Contact")
mailItem.CompanyName = sCompany
mailItem.LastName = sLName
mailItem.FirstName = sFName
mailItem.Email1Address = sEMail
mailItem.HomeTelephoneNumber = sHPhone
mailItem.BusinessTelephoneNumber = sWPhone
mailItem.MobileTelephoneNumber = sMPhone
'mailItem.Subject = sName
mailItem.Save