Dear Sue,
Pls ignore my reply earlier on your question below. It is working now. Thank
you a lot for your prompt and precise reply.
Regards,
TS Lim
"Sue Mosher [MVP-Outlook]" wrote:
What specifically doesn't work? Error messages? Other symptoms? Does myItem
return the correct object?
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
"TS Lim" wrote:
After finding the item, I can read data of fields of the item. But to write
data, it still does not work. Any advise ?
TS Lim
"Sue Mosher [MVP-Outlook]" wrote:
Yes, that's it exactly.
"TS Lim" wrote:
After finding a contact item, is it possible to write data into another field
of the item ?
In the example below, after finding the item with the CustomerID field. It
try to write data into the Spouse field. Is it the right way to do it ? It
not, kindly advsie a way where I can write data into the fields of item
selected.
Dim myOlApp As New Outlook.Application
Dim myNamespace As Outlook.NameSpace
Dim myContacts As Outlook.Folder
Dim myItem As Outlook.ContactItem
Set myNamespace = myOlApp.GetNamespace("MAPI")
Set myContacts = myNamespace.GetDefaultFolder(olFolderContacts)
Set myItem = myContacts.Items.Find("[CustomerID] = ""ID0000001""")
myItem.Spouse = "Mrs ID000001"
myItem.Save
Your advise is appreciated.
Thank you.
TS Lim