exchangefreaks.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Modify Contacts in a Publlic Folder with CDO and VB

 
Post new topic   Reply to topic    exchangefreaks.com Forum Index -> MS Exchange Applications
Author Message
Ray Mollenhauer



Joined: 05 Aug 2007
Posts: 1

PostPosted: Wed Oct 08, 2003 12:33 pm    Post subject: Modify Contacts in a Publlic Folder with CDO and VB Reply with quote

Hello

I have created contacts in a public folder in Exchange 2000 with
vbscript and cdo:

Dim iPer
Dim strURL
Set ipers = CreateObject("CDO.Person")
With iPers
.Fields("urn:schemas:contacts:cn")="Firstname" & "Lastname"
.LastName = "Lastname"
.FileAs ="Firstname" & "Lastname"
.Fields("formcoll")="foolcoll" 'custom field
'Indicate that this is a contact
.Fields("objectClass").Value = "contact"
'Save changes made to properties
.Fields.Update
'Setup the URL for the users contact folder
strURL = "file://./backofficestorage\TEST_SITE.TEST_ORG.COM\PUBLIC
FOLDERS\my_contacts\"
'Save the contact to the users contact folder
iPers.DataSource.SavetoFolder strURL

1. How can i change for the lastname Value for this existing contact
2. Is this the right way to add an custom property (line Cool ? -
because an query with mapi do not get an value .

Thanx in advance

Ray Mollenhauer

Archived from group: microsoft>public>exchange>applications
Back to top
View user's profile Send private message
chad



Joined: 05 Aug 2007
Posts: 17

PostPosted: Sat Oct 11, 2003 2:23 am    Post subject: Re: Modify Contacts in a Publlic Folder with CDO and VB Reply with quote

ray.mollenhauer@infowan.de (Ray Mollenhauer) wrote:
>Hello
>
>I have created contacts in a public folder in Exchange 2000 with
>vbscript and cdo:
>
>Dim iPer
>Dim strURL
>Set ipers = CreateObject("CDO.Person")
> With iPers
> .Fields("urn:schemas:contacts:cn")="Firstname" & "Lastname"
> .LastName = "Lastname"
> .FileAs ="Firstname" & "Lastname"
> .Fields("formcoll")="foolcoll" 'custom field
> 'Indicate that this is a contact
> .Fields("objectClass").Value = "contact"
> 'Save changes made to properties
> .Fields.Update
>'Setup the URL for the users contact folder
>strURL = "file://./backofficestorage\TEST_SITE.TEST_ORG.COM\PUBLIC
>FOLDERS\my_contacts\"
>'Save the contact to the users contact folder
>iPers.DataSource.SavetoFolder strURL
>
>1. How can i change for the lastname Value for this existing contact
>2. Is this the right way to add an custom property (line Cool ? -
>because an query with mapi do not get an value .
>
>Thanx in advance
>concatenated
>Ray Mollenhauer



----== Posted via Usenet.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.Usenet.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    exchangefreaks.com Forum Index -> MS Exchange Applications All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group