Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Exchange
2000.active.directory
2000.admin
2000.announcements
2000.app.conversion
2000.applications
2000.clients
2000.clustering
2000.connectivity
2000.development
2000.documentation
2000.general
2000.information.store
2000.interop
2000.kms
2000.misc
2000.protocols
2000.realtime.collabo.
2000.setup
2000.transport
2000.win2000
admin
application.conversion
applications
clients
clustering
connectivity
design
development
misc
mobility
setup
tools
  
 
date: Tue, 22 Jan 2008 05:39:10 -0800 (PST),    group: microsoft.public.exchange2000.development        back       


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 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
date: Tue, 22 Jan 2008 05:39:10 -0800 (PST)   author:   Dhananjay

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us