Contact Details from Appointment Item

Status
Not open for further replies.
Hi,




I want those contact details who are in appointment,I am able to get the Name of attendee with following code.But i am not able to get his corresponding Mobile/Telephone Number








Code:
int i = 0;
           int j=0;
           Outlook.Recipients rec;
           Outlook.Application oApp = new Outlook.Application();
           Outlook.NameSpace oNS = oApp.GetNamespace("MAPI");
           oNS.Logon(Type.Missing, Type.Missing, false, true);
           Outlook.MAPIFolder Ocalender = oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderCalendar );
           Outlook.Items oItems = Ocalender.Items;
           int iNumContacts = oItems.Count;
 
 

           
           DataSet ds_temp = new DataSet();
           DataTable dtable_temp = new DataTable("Temp_Table");
 
 

           dtable_temp.Columns.Add("Sr. No.");
           dtable_temp.Columns.Add("Name");
           dtable_temp.Columns.Add("Phone");
           dtable_temp.Columns.Add("Check", typeof(bool));
           
           DataRow dr_temp;
 
 

           if (iNumContacts != 0)
           {
               for (i = 1; i <= iNumContacts; i++)
               {
                   dr_temp = dtable_temp.NewRow();
                   Outlook.AppointmentItem c = (Outlook.AppointmentItem)(oItems[i]);
                   rec = c.Recipients ;
 
 

                   for (j = 1; j <= rec.Count; j++)
                   {
                       string re = rec[j].AddressEntry.Name ;
                   }
               }
           }





Can u help me




Thanks in Advance




Pratik Asthana
 
Outlook has no idea that you happen to have a contact with teh same e-mail

address as a meetign attendee.

The best you can do is read the value of the attendee e-mail address, then

search (Items.Find) for a matching contact in the default (or any other)

Contacts folder.

Dmitry Streblechenko (MVP)

-

"pratikasthana17" <pratikasthana17.4027km@invalid> wrote in message

news:pratikasthana17.4027km@invalid...

> Hi,

> I want those contact details who are in appointment,I am able to get
> the Name of attendee with following code.But i am not able to get his
> corresponding Mobile/Telephone Number

> Code:
> ------------------
> int i = 0;
> int j=0;
> Outlook.Recipients rec;
> Outlook.Application oApp = new Outlook.Application();
> Outlook.NameSpace oNS = oApp.GetNamespace("MAPI");
> oNS.Logon(Type.Missing, Type.Missing, false, true);
> Outlook.MAPIFolder Ocalender =
> oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderCalendar );
> Outlook.Items oItems = Ocalender.Items;
> int iNumContacts = oItems.Count;

> DataSet ds_temp = new DataSet();
> DataTable dtable_temp = new DataTable("Temp_Table");

> dtable_temp.Columns.Add("Sr. No.");
> dtable_temp.Columns.Add("Name");
> dtable_temp.Columns.Add("Phone");
> dtable_temp.Columns.Add("Check", typeof(bool));

> DataRow dr_temp;

> if (iNumContacts != 0)
> {
> for (i = 1; i <= iNumContacts; i++)
> {
> dr_temp = dtable_temp.NewRow();
> Outlook.AppointmentItem c = (Outlook.AppointmentItem)(oItems);
> rec = c.Recipients ;

> for (j = 1; j <= rec.Count; j++)
> {
> string re = rec[j].AddressEntry.Name ;
> }
> }
> }

> ------------------
> Can u help me

> Thanks in Advance

> Pratik Asthana

> > pratikasthana17
> >
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
Diane Poremsky VBA: Get All Contact Details Using Outlook 0
L Business Contact Mnager losing contact details BCM (Business Contact Manager) 1
K Who made changes to a shared contact Using Outlook 3
C Can't Use Custom Contact form in Outlook Classic since early January 2026 Outlook VBA and Custom Forms 7
F Inaccurate Contact List Using Outlook 5
N Why does Outlook keeping adding to the email address I have in my notes portion of a contact? Using Outlook 2
K Can we use script on a custom contact form Outlook VBA and Custom Forms 6
G Contact list separates some entries that have identical characteristics Using Outlook 0
G Reduce whitespace in Outlook desktop Contact Cards display Using Outlook 3
U Found a muck-up in the website but didn't know how to contact its owner.... Using Outlook 4
Rupert Dragwater Contact list didn't download Using Outlook 9
A Accessing full contact forms Using Outlook 2
C Mass Change Selected Contact Photos Outlook VBA and Custom Forms 1
G Outlook Contact Item.Restrict where FullName is NULL Outlook VBA and Custom Forms 3
M Outlook changes the "Modified" field when moving/copying a Contact. Using Outlook 0
G Outlook 2021 Add Picture to Custom Contact Form Outlook VBA and Custom Forms 2
AndyZ Contact Custom Form Tiny Text Outlook VBA and Custom Forms 3
A How to reduce size of custom contact form? Outlook VBA and Custom Forms 3
S Custom Contact card - need help creating one Outlook VBA and Custom Forms 1
U Outlook 2021 not showing contact cards in Searches Using Outlook 1
Witzker Outlook 2019 Macro to seach in all contact Folders for marked Email Adress Outlook VBA and Custom Forms 0
Witzker How to get the button Karte ( map) in custom contact form Outlook VBA and Custom Forms 2
G Adding a contact to a specific folder Using Outlook 0
B Linking contact to an Appointment Using Outlook 1
Witzker Outlook 2019 How to get a Photo in a User Defined Contact form Outlook VBA and Custom Forms 2
Witzker Outlook 2019 Macro to send an Email Template from User Defined Contact Form Outlook VBA and Custom Forms 0
jehan2256 "History" button in Business Contact Manager Using Outlook 1
Witzker Outlook 2019 Edit contact from email does not open the user defined contactform Using Outlook 3
Horsepower Contact phone numbers randomly change Using Outlook 0
Witzker Set Cursor & Focus from any field to the body of a user Contact form in OL 2019 Outlook VBA and Custom Forms 1
Witzker Place cursor at opening, a user defined OL contact form Outlook VBA and Custom Forms 2
M Contact deletion Using Outlook 2
R Roadrunner Email Settings | Contact Roadrunner Customer Support Outlook VBA and Custom Forms 0
M Accessing ALL Outlook contact fields Outlook VBA and Custom Forms 3
S Outlook 365 Shared mailbox contact group member numbers not matching Using Outlook 0
D Contact Group - Adding Bulk Addresses Using Outlook 2
F Outlook 365 No scroll bars in Contact Using Outlook 2
N Contact Form Notes Field Touch vs Mouse Using Outlook 0
J "Contact" button in Journal entry Using Outlook 1
Witzker How to find all emails from and to a contact in OL 2019 Using Outlook 6
D Advanced e-Mail search on from/to contact group only searches for first 20 contacts in group Using Outlook 0
G Send a greeting message to a contact on birthday Outlook VBA and Custom Forms 5
S CONTACT FIELD PRINT ORDER Outlook VBA and Custom Forms 1
I Button PDF in Outlook Contact custom form Outlook VBA and Custom Forms 1
O Outlook 365 - How to create / copy a new contact from an existing one? Using Outlook 5
N contact list seen in Contact folder but knot in Address book or when 'TO' button is clicked in new email Using Outlook 0
M Disable Contact Card Results when using "Search People" in Outlook Ribbon Using Outlook 7
M Contact suggestion Using Outlook 2
H Custom Outlook Contact Form VBA Outlook VBA and Custom Forms 1
Witzker HowTo Change message Class of contact form Outlook VBA and Custom Forms 0

Similar threads

Back
Top