Easy question - CDOEX - how to update the "office" contact f
Exchange Server Forum Index Exchange Server
Discussion forums for Microsoft Exchange Server users.
Microsoft Outlook
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web ExchangeServerHelp.com
Easy question - CDOEX - how to update the "office" contact f

 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development
Author Message
Brett
Guest





Posted: Thu Sep 08, 2005 4:59 pm    Post subject: Easy question - CDOEX - how to update the "office" contact f Reply with quote

I'm using the below script to create a new "contact" object in a public
folder. We don't want it to show up in the GAL (Exchange Server 2003).
I run the script below on the server, and it works fine. Simple, right?
However, I can't find the Field name I need to use to update the
"Office" field in the contact. (You'd think it would be
"urn:schemas:contacts:office" or just oPerson.Office, but no go!)

What do I use?

*****************************************

Option Explicit

Dim oPerson, strContactURL

Set oPerson = CreateObject("CDO.Person")

strContactURL =
"http://exchangeserver/public/other%20Contacts/our%20Contacts/"


oPerson.FirstName = "Firstname"
oPerson.LastName = "Lastname"
oPerson.Company = "Company"
oPerson.Email = "testuser2@ourdomain.com"
oPerson.WorkPhone = "(555) 225 5555"
oPerson.MailingAddressID = 2
oPerson.Fields("urn:schemas:contacts:department").Value =
"testDepartment"
oPerson.Fields.Update
oPerson.DataSource.SaveToContainer strContactURL
'*********************************

Back to top
Brett
Guest





Posted: Thu Sep 08, 2005 10:28 pm    Post subject: Re: Easy question - CDOEX - how to update the "office" conta Reply with quote

Found it. Oddly enough, it's "urn:schemas:contacts:roomnumber".


Brett wrote:
Quote:
I'm using the below script to create a new "contact" object in a public
folder. We don't want it to show up in the GAL (Exchange Server 2003).
I run the script below on the server, and it works fine. Simple, right?
However, I can't find the Field name I need to use to update the
"Office" field in the contact. (You'd think it would be
"urn:schemas:contacts:office" or just oPerson.Office, but no go!)

What do I use?

*****************************************

Option Explicit

Dim oPerson, strContactURL

Set oPerson = CreateObject("CDO.Person")

strContactURL =
"http://exchangeserver/public/other%20Contacts/our%20Contacts/"


oPerson.FirstName = "Firstname"
oPerson.LastName = "Lastname"
oPerson.Company = "Company"
oPerson.Email = "testuser2@ourdomain.com"
oPerson.WorkPhone = "(555) 225 5555"
oPerson.MailingAddressID = 2
oPerson.Fields("urn:schemas:contacts:department").Value =
"testDepartment"
oPerson.Fields.Update
oPerson.DataSource.SaveToContainer strContactURL
'*********************************
Back to top
 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server Dedicated Servers
Contact Us
New Topics Powered by phpBB