How to read LastNumber in contact
-
Tuesday, May 26, 2009 9:56 AM
I would like to read the LastNumber for each contact. I find the PIMPR_SMARTPROP property of POOM (http://msdn.microsoft.com/en-us/library/bb415504.aspx) but I can't use.
I also find a wrapper og POOM library (.NET Compact Framework Sample: POOM Wrapper .NET Compact Framework Sample: POOM Wrapper http://www.microsoft.com/downloads/details.aspx?FamilyID=80d3d611-cc81-4190-aab4-b1ea57637bac&DisplayLang=en)
but there isn't P_IMPR_SMARTPROP propertyI need in managed code (c#)
Thanks
Answers
-
Thursday, May 28, 2009 1:26 PM
Hi, I've just blogged about this topic and maybe you can find the didactic sample code useful: http://blogs.msdn.com/raffael/archive/2009/05/28/the-right-approach-to-get-a-contact-s-last-communication-iitem-s-pimpr-smartprop.aspx. Thanks for the idea! :-)
Thanks,
~raffaele
http://blogs.msdn.com/raffael
This posting is provided 'as is' with no warranties and confers no rights.- Proposed As Answer by Raffaele Limosani [MSFT] Thursday, May 28, 2009 1:26 PM
- Marked As Answer by warrentangModerator Monday, June 01, 2009 2:46 AM
All Replies
-
Tuesday, May 26, 2009 1:03 PM
Hi,
What do you mean by last number? Can you please explain more about it? Please find the code to add the contacts to listview.private void AddContacts() { OutlookSession _outlookSession = new OutlookSession(); for (int i = 0; i < _outlookSession.Contacts.Items.Count; i++) { listViewItem = new ListViewItem(_outlookSession.Contacts.Items[i].ItemId.ToString()); //_outlookSession listViewItem.SubItems.Add(_outlookSession.Contacts.Items[i].FirstName + _outlookSession.Contacts.Items[i].LastName); listViewItem.SubItems.Add(_outlookSession.Contacts.Items[i].MobileTelephoneNumber.ToString()); listViewItem.SubItems.Add(_outlookSession.Contacts.Items[i].HomeTelephoneNumber.ToString()); lviewContacts.Items.Add(listViewItem); } }Regards,
Malleswar -
Tuesday, May 26, 2009 1:19 PM
Last Number is the last type number that user make (for example if I have a contact with mobile, business and home phone. I call Business, I would like find the information that I make business call (last number) for that contact) -
Tuesday, May 26, 2009 3:04 PM
Hi Claudio,
In that case, you need check all the numbers(from last contact number) whether it is existing.
Just to retrieve the business telephone number
GetSessionObject().Contacts.Items[j].BusinessTelephoneNumber
if you are talking about the call history(P/Invoke)
http://www.codeproject.com/KB/mobile/wm_callhistory.aspx?display=Print
Regards,
Malleswar- Proposed As Answer by Malleswar [MCTS]MVP Tuesday, May 26, 2009 3:04 PM
-
Wednesday, May 27, 2009 6:13 AMHi, Malleswar
this is a good idea, but if I delete call history, the information in my contatcs list of last call is maintained.
I find a microsoft article http://msdn.microsoft.com/en-us/library/bb415504.aspx: “The Smart Property (PIMPR_SMARTPROP) is the Contact property that contains the property ID of the default communication mode. This becomes the phone number or address displayed on the second line of the two-line display in the Contact list view, and highlighted in the Contact summary tab.” but I do not know like reading that property.
Thanks -
Thursday, May 28, 2009 1:26 PM
Hi, I've just blogged about this topic and maybe you can find the didactic sample code useful: http://blogs.msdn.com/raffael/archive/2009/05/28/the-right-approach-to-get-a-contact-s-last-communication-iitem-s-pimpr-smartprop.aspx. Thanks for the idea! :-)
Thanks,
~raffaele
http://blogs.msdn.com/raffael
This posting is provided 'as is' with no warranties and confers no rights.- Proposed As Answer by Raffaele Limosani [MSFT] Thursday, May 28, 2009 1:26 PM
- Marked As Answer by warrentangModerator Monday, June 01, 2009 2:46 AM

