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 

Help on CDOEX library

 
Post new topic   Reply to topic    exchangefreaks.com Forum Index -> MS Exchange 2000 Development
Author Message
Dhananjay



Joined: 11 Jan 2008
Posts: 5

PostPosted: Tue Jan 22, 2008 10:39 am    Post subject: Help on CDOEX library Reply with quote

Hi All,
I am novice person for exchange 2000 programming. Please help me to
solve this problem.
I have created one vb6 application for creating the contact on one of
the user on exchange server ( I got the similar code on MS site in
c#). I have 3 users on exchange viz. smoadmin, administrator & trial.
My code snippet is as follows -

Private Sub Command1_Click()
On Error GoTo ErrHandle
Dim oItem As CDO.Item
Set oItem = New CDO.Item

Dim sURL As String
sURL = "http://sbsserver/Exchange/smoadmin/contacts"

Dim oFields As ADODB.Fields
Set oFields = oItem.Fields

oFields("DAV:contentclass").Value = "urn:content-classes:person"
oFields("http://schemas.microsoft.com/exchange/
outlookmessageclass").Value = "IPM.Contact"
oFields("urn:schemas:contacts:cn").Value = "David Jones"
oFields("urn:schemas:contacts:nickname").Value = "Dave"
oFields("urn:schemas:contacts:title").Value = "Engineer"
oFields("urn:schemas:contacts:department").Value = "DSX Messaging"
oFields("urn:schemas:contacts:email1").Value = "someone@example.com"


oFields.Update
oItem.DataSource.SaveToContainer sURL, Nothing, _
ADODB.ConnectModeEnum.adModeReadWrite, _
ADODB.RecordCreateOptionsEnum.adCreateNonCollection, _
ADODB.RecordOpenOptionsEnum.adOpenSource, _
"", ""

Set oItem = Nothing
Set oFields = Nothing
MsgBox "done"
Exit Sub
ErrHandle:
MsgBox Err.Number & " -> " & Err.Description
End Sub

Now I execute this application on exchange server, it works fine. If I
change sURL to "http://sbsserver/Exchange/administrator/contacts",
then also it works fine! But when I change sURL to "http://sbsserver/
Exchange/trial/contacts", then it throws the error "Unspecified error"
at SaveToContainer statement. What should I do for it. Please can
anybody tell me where to find CDOEX help from start to finish.
Also I noticed one thing, that I can write down "http://sbsserver/
Exchange/smoadmin/contacts" in internet explorer directly to get the
contacts of smoadmin person. But if I want to get the contacts folder
of trial then I have to user "http://sbsserver/Exchange/trial2/
contacts" i.e. trial2 instead of trial. Furher some other questions
are -
1> How to create a task for user in exchange programmatically?
2> Where to find the correct url for folder in exchange (like "http://
sbsserver/Exchange/smoadmin/contacts" --- I have just tried it
manually)?
3> Where to find all references for urn:schemas values?


Please help me!

Thanks in advance,
Dhananjay

Archived from group: microsoft>public>exchange2000>development
Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
CDOEX/ADO query across administrative groups fails Hello, In my application I'm using the following code to query mailbox calendar: Dim cnxEx As New rsEx As New Dim strQuery As String = _ "SELECT ""DAV:href"" " & _ "FROM TRAVERSAL OF """ & CalendarUrl & """

Help on CDOEX library Hi All, I am novice person for exchange 2000 programming. Please help me to solve this problem. I have created one vb6 application for creating the contact on one of the user on exchange server ( I got the similar code on MS site in c#). I have 3 users on

Help on CDOEX library Hi All, I am novice person for exchange 2000 programming. Please help me to solve this problem. I have created one vb6 application for creating the contact on one of the user on exchange server ( I got the similar code on MS site in c#). I have 3 users on

Please help...ASP/CDOEX problem I am having a problem with the following code when attempting to run it on an ASP page. The point of the code is to create an appointment object, save it, then send a meeting request to the designated recipient. I am executing it on an Exchange 2K serve

Creating appointments - WebDAV or CDOEX? Hi, which one is the best (by best, I mean easier and painless) way of creating appointments to users without their intervention? I was using CDOEX, but sometimes it just makes me wanna die... =) I'm also using to make things easier. The
Post new topic   Reply to topic    exchangefreaks.com Forum Index -> MS Exchange 2000 Development 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