tags:

views:

24

answers:

1

How to add outlook custom fields in ms access? Example:

 Set objOutlook = CreateObject("Outlook.Application")
 Set item = objOutlook.CreateItem(2)  
 Set nms = objOutlook.GetNamespace("MAPI")
 Set fldContacts = nms.GetDefaultFolder(10)
 Set itms = fldContacts.Items 
 Set item = itms.Add
    item.FirstName = Me.FirstName
    ...
    item.Email1Address = Me.Email
    item.Fields("ClientId") = "Client1"
    item.Display

item.Fields("ClientId") = "Client1" -> This line does not work, any idea how to make this thing work? Thanks!!

A: 

I don't have access to Outlook to test this now, but it looks like it should be

item.Fields("ClientId").Text = "Client1"

or

item.Fields("ClientId").Value = "Client1"

In other words, it looks like your code is trying to turn a control into a string ("Client1"), when you want to set the control's text (or value) to the string "Client1".

David Stratton
Thanks david for the response. But still i got "Run-time error '438' Object doesnt support this property or method"
Arnold