P
Paul Mac
Hi All,
I have a Outlook Form (Contact) with many custom fields on it, and I'm now
trying to add Contacts to the "Contacts" field programatically.
By default, the Contact Field has the event to open the MAPI Contact Folder
for you to select the recipient. The problem is that the Contacts I need to
source are in the GAL.
I have added some code to a replacement Command Button, which accesses the
GAL via CDO (From Sues Site.
http://www.outlookcode.com/d/code/selectnames.htm) modifying the multiple
recipient collection, to fire on the cmdAddContacts_Click event.
The issue that I'm now facing is how to update the "Contacts" field.
I've tried the following:
1................................................
Set colRecips = Item.Contacts
For Each objCDORecip In colCDORecips
Set objRecip = colRecips.Add( _
objCDORecip.AddressEntry.Address)
Next
2.................................................
Set Item.Contacts = colCDORecips
3................................................
Item.Contacts.Add objCDORecip.Item(1)
I'm sure that the simplest of solutions will be the answer, but I'm not sure
of how to add items to the Contacts collection.
Any help would be appreciated.
Thanks in Adavance,
Paul Mac
I have a Outlook Form (Contact) with many custom fields on it, and I'm now
trying to add Contacts to the "Contacts" field programatically.
By default, the Contact Field has the event to open the MAPI Contact Folder
for you to select the recipient. The problem is that the Contacts I need to
source are in the GAL.
I have added some code to a replacement Command Button, which accesses the
GAL via CDO (From Sues Site.
http://www.outlookcode.com/d/code/selectnames.htm) modifying the multiple
recipient collection, to fire on the cmdAddContacts_Click event.
The issue that I'm now facing is how to update the "Contacts" field.
I've tried the following:
1................................................
Set colRecips = Item.Contacts
For Each objCDORecip In colCDORecips
Set objRecip = colRecips.Add( _
objCDORecip.AddressEntry.Address)
Next
2.................................................
Set Item.Contacts = colCDORecips
3................................................
Item.Contacts.Add objCDORecip.Item(1)
I'm sure that the simplest of solutions will be the answer, but I'm not sure
of how to add items to the Contacts collection.
Any help would be appreciated.
Thanks in Adavance,
Paul Mac