![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
On May 23, 1:28 pm, Eric Legault [MVP - Outlook]
wrote: The DASL name for the EntryID property is DAV:id! -- Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.) Try Picture Attachments Wizard for Outlook:http://www.collaborativeinnovations.ca Blog:http://blogs.officezealot.com/legault/ " wrote: Hi guys, i'm using C# with CDO 1.21 (Exchange dll) and ADODB for listing all the Personal Contacts of my users and sending that into a database! I'm using this code for that : iPerson = new CDO.PersonClass(); iPerson.DataSource.Open(strEmailAddress2, null, ADODB.ConnectModeEnum.adModeRead, ADODB.RecordCreateOptionsEnum.adFailIfNotExists, ADODB.RecordOpenOptionsEnum.adOpenSource, String.Empty, String.Empty); iMailbox = (CDO.IMailbox)iPerson.GetInterface("IMailbox"); Console.WriteLine(iMailbox.BaseFolder); ADODB.Connection oCn = new ADODB.Connection(); ADODB.Recordset oRs = new ADODB.Recordset(); ADODB.Fields oFields; oCn.Provider = "ExOLEDB.Datasource"; oCn.Open(iMailbox.Contacts, "", "", -1); string strSql; strSql = ""; strSql = "select "; strSql = strSql + "\"DAV:href\", \"urn:schemas:contacts:cn\" "; strSql = strSql + ", \"http:// schemas.microsoft.com/mapi/id/{00062004-0000-0000-C000-000000000046}/ 0x8083\" "; strSql = strSql + ", \"urn:schemas:contacts:businesshomepage\" "; strSql = strSql + ", \"urn:schemas:contacts:callbackphone\" "; strSql = strSql + ", \"urn:schemas:contacts:co \" "; strSql = strSql + ", \"urn:schemas:contacts:facsimiletelephonenumber \" "; strSql = strSql + ", \"urn:schemas:contacts:homeCity\" "; strSql = strSql + ", \"urn:schemas:contacts:homeCountry\" "; strSql = strSql + ", \"urn:schemas:contacts:homefax\" "; strSql = strSql + ", \"urn:schemas:contacts:homephone2\" "; strSql = strSql + ", \"urn:schemas:contacts:homePhone\" "; strSql = strSql + ", \"urn:schemas:contacts:homePostaladdress\" "; strSql = strSql + ", \"urn:schemas:contacts:homePostalCode\" "; strSql = strSql + ", \"urn:schemas:contacts:homepostofficebox\" "; strSql = strSql + ", \"urn:schemas:contacts:homeState\" "; strSql = strSql + ", \"urn:schemas:contacts:homeStreet\" "; strSql = strSql + ", \"urn:schemas:contacts:mailingcity\" "; strSql = strSql + ", \"urn:schemas:contacts:mailingcountry\" "; strSql = strSql + ", \"urn:schemas:contacts:mailingpostaladdress\" "; strSql = strSql + ", \"urn:schemas:contacts:mailingpostalcode\" "; strSql = strSql + ", \"urn:schemas:contacts:mailingpostofficebox\" "; strSql = strSql + ", \"urn:schemas:contacts:mailingstate\" "; strSql = strSql + ", \"urn:schemas:contacts:mailingstreet\" "; strSql = strSql + ", \"urn:schemas:contacts:mobile\" "; strSql = strSql + ", \"urn:schemas:contacts ![]() strSql = strSql + ", \"urn:schemas:contacts ![]() strSql = strSql + ", \"urn:schemas:contacts ![]() strSql = strSql + ", \"urn:schemas:contacts ![]() strSql = strSql + ", \"urn:schemas:contacts ![]() strSql = strSql + ", \"urn:schemas:contacts ![]() strSql = strSql + ", \"urn:schemas:contacts ![]() strSql = strSql + ", \"urn:schemas:contacts ![]() strSql = strSql + ", \"urn:schemas:contacts ![]() strSql = strSql + ", \"urn:schemas:contacts ![]() strSql = strSql + ", \"urn:schemas:contacts ![]() strSql = strSql + ", \"urn:schemas:contacts ![]() strSql = strSql + ", \"urn:schemas:contacts ![]() strSql = strSql + ", \"urn:schemas:contacts ![]() strSql = strSql + ", \"urn:schemas:contacts ![]() strSql = strSql + ", \"urn:schemas:contacts ![]() strSql = strSql + ", \"urn:schemas:contacts ![]() strSql = strSql + ", \"urn:schemas:contacts ![]() strSql = strSql + ", \"urn:schemas:contacts:street\" "; strSql = strSql + ", \"urn:schemas:contacts:telephoneNumber\" "; strSql = strSql + ", \"urn:schemas:contacts:telephonenumber2\" "; strSql = strSql + ", \"urn:schemas:contacts:telexnumber\" "; strSql = strSql + ", \"urn:schemas:contacts:title\" "; strSql = strSql + ", \"urn:schemas:contacts:workaddress\" "; strSql = strSql + " from scope ('shallow traversal of " + "\""; strSql = strSql + iMailbox.Contacts + "\"') "; oRs.Open(strSql, oCn, ADODB.CursorTypeEnum.adOpenUnspecified, ADODB.LockTypeEnum.adLockOptimistic, 1); This is only a part of the code, but it show you how i do that! The problem, is that i want the Unique Identifier of that contact! Is there a way for me to retrieve a unique identifier of the contact? Thanks a zillion! Thank you so much! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Retrieve EntryID from CDO 1.21 | laperled@gmail.com | Outlook and VBA | 1 | May 23rd 07 06:28 PM |
EntryID | Ela | Outlook and VBA | 2 | April 13th 07 12:10 AM |
EntryID is nothing | donald | Add-ins for Outlook | 2 | March 20th 06 05:08 PM |
Invalid EntryID | KatTheBird | Outlook - Using Contacts | 0 | March 7th 06 06:45 AM |
EntryID | Arne Baldauf | Outlook and VBA | 3 | February 4th 06 05:41 PM |