A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

get phone no from addressbook



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 21st 07, 01:18 PM posted to microsoft.public.outlook.program_vba
shubhangi
external usenet poster
 
Posts: 28
Default get phone no from addressbook

hello
I'm displaying AddressBook in Outlook 2007 (from VSTO Addin)with
App.GetNamespace("MAPI").GetSelectNamesDialog
The user is allowed to select only one entry.I want to get the selected
contact entry's corresponding phone
no. The selected contact entry say A B is shown in address book as
DisplayName
A B(Business Fax)
A B(Home Fax)
A B(Other Fax)

If the user select A B(Home Fax),I need to retrieve Home Fax no.Do I've to
get contact
from AddressENtry.GetContact & then check the selected contact entry from
addressbook with Contact's all types of
phone nos or any other way is there?

Thanks



Ads
  #2  
Old December 21st 07, 02:26 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default get phone no from addressbook

You would use SelectNamesDialog.Recipients.Item(1).AddressEntry. GetContact
to get the contact and from there you read any contact property you want.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"shubhangi" wrote in message
...
hello
I'm displaying AddressBook in Outlook 2007 (from VSTO Addin)with
App.GetNamespace("MAPI").GetSelectNamesDialog
The user is allowed to select only one entry.I want to get the selected
contact entry's corresponding phone
no. The selected contact entry say A B is shown in address book as
DisplayName
A B(Business Fax)
A B(Home Fax)
A B(Other Fax)

If the user select A B(Home Fax),I need to retrieve Home Fax no.Do I've to
get contact
from AddressENtry.GetContact & then check the selected contact entry from
addressbook with Contact's all types of
phone nos or any other way is there?

Thanks




  #3  
Old December 24th 07, 01:47 PM posted to microsoft.public.outlook.program_vba
shubhangi
external usenet poster
 
Posts: 28
Default get phone no from addressbook

Thanks for the reply
But I want to retrieve the selected phone number of selected contact from
AddressBook.My addressbook shows 3 entries for same contact-
DisplayName
A B(Business Fax)
A B(Home Fax)
A B(Other Fax)

If user selects entry A B(Home Fax) then I want home fax no of contact A
B.I get the
selected contact with
SelectNamesDialog.Recipients.Item(1).AddressEntry. GetContact
but how would I know that user has selected A B(Business Fax) or A B(Home
Fax) or
A B(Other Fax). ?


"Ken Slovak - [MVP - Outlook]" wrote in message
...
You would use SelectNamesDialog.Recipients.Item(1).AddressEntry. GetContact
to get the contact and from there you read any contact property you want.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"shubhangi" wrote in message
...
hello
I'm displaying AddressBook in Outlook 2007 (from VSTO Addin)with
App.GetNamespace("MAPI").GetSelectNamesDialog
The user is allowed to select only one entry.I want to get the selected
contact entry's corresponding phone
no. The selected contact entry say A B is shown in address book as
DisplayName
A B(Business Fax)
A B(Home Fax)
A B(Other Fax)

If the user select A B(Home Fax),I need to retrieve Home Fax no.Do I've
to get contact
from AddressENtry.GetContact & then check the selected contact entry from
addressbook with Contact's all types of
phone nos or any other way is there?

Thanks






  #4  
Old December 24th 07, 07:34 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default get phone no from addressbook

You'll see something like "Joe Blow (Business Fax)" for Recipient.Name and
something like "Joe Blow@+1 (555) 555-5555" for Recipient.Address if it's a
fax number. You'll have to experiment with the return values with both
Exchange and non-Exchange profiles to see what's being returned in each
case.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"shubhangi" wrote in message
...
Thanks for the reply
But I want to retrieve the selected phone number of selected contact from
AddressBook.My addressbook shows 3 entries for same contact-
DisplayName
A B(Business Fax)
A B(Home Fax)
A B(Other Fax)

If user selects entry A B(Home Fax) then I want home fax no of contact A
B.I get the
selected contact with
SelectNamesDialog.Recipients.Item(1).AddressEntry. GetContact
but how would I know that user has selected A B(Business Fax) or A B(Home
Fax) or
A B(Other Fax). ?


"Ken Slovak - [MVP - Outlook]" wrote in message
...
You would use
SelectNamesDialog.Recipients.Item(1).AddressEntry. GetContact to get the
contact and from there you read any contact property you want.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"shubhangi" wrote in message
...
hello
I'm displaying AddressBook in Outlook 2007 (from VSTO Addin)with
App.GetNamespace("MAPI").GetSelectNamesDialog
The user is allowed to select only one entry.I want to get the selected
contact entry's corresponding phone
no. The selected contact entry say A B is shown in address book as
DisplayName
A B(Business Fax)
A B(Home Fax)
A B(Other Fax)

If the user select A B(Home Fax),I need to retrieve Home Fax no.Do I've
to get contact
from AddressENtry.GetContact & then check the selected contact entry
from addressbook with Contact's all types of
phone nos or any other way is there?

Thanks







  #5  
Old December 26th 07, 01:43 PM posted to microsoft.public.outlook.program_vba
shubhangi
external usenet poster
 
Posts: 28
Default get phone no from addressbook

Thanks,I'll experiment with that.

"Ken Slovak - [MVP - Outlook]" wrote in message
...
You'll see something like "Joe Blow (Business Fax)" for Recipient.Name and
something like "Joe Blow@+1 (555) 555-5555" for Recipient.Address if it's
a fax number. You'll have to experiment with the return values with both
Exchange and non-Exchange profiles to see what's being returned in each
case.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"shubhangi" wrote in message
...
Thanks for the reply
But I want to retrieve the selected phone number of selected contact
from AddressBook.My addressbook shows 3 entries for same contact-
DisplayName
A B(Business Fax)
A B(Home Fax)
A B(Other Fax)

If user selects entry A B(Home Fax) then I want home fax no of contact A
B.I get the
selected contact with
SelectNamesDialog.Recipients.Item(1).AddressEntry. GetContact
but how would I know that user has selected A B(Business Fax) or A B(Home
Fax) or
A B(Other Fax). ?


"Ken Slovak - [MVP - Outlook]" wrote in message
...
You would use
SelectNamesDialog.Recipients.Item(1).AddressEntry. GetContact to get the
contact and from there you read any contact property you want.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"shubhangi" wrote in message
...
hello
I'm displaying AddressBook in Outlook 2007 (from VSTO Addin)with
App.GetNamespace("MAPI").GetSelectNamesDialog
The user is allowed to select only one entry.I want to get the selected
contact entry's corresponding phone
no. The selected contact entry say A B is shown in address book as
DisplayName
A B(Business Fax)
A B(Home Fax)
A B(Other Fax)

If the user select A B(Home Fax),I need to retrieve Home Fax no.Do I've
to get contact
from AddressENtry.GetContact & then check the selected contact entry
from addressbook with Contact's all types of
phone nos or any other way is there?

Thanks









 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Phone Numbers and Blackberry - Phone Number Extensions Jim Outlook - General Queries 5 January 11th 07 03:46 PM
Phone Numbers and Blackberry - Phone Number Extensions Jim Outlook - Using Contacts 5 January 11th 07 03:46 PM
error exporting phone numbers to a mobile phone Andrew J Farrow Outlook - Using Contacts 0 August 8th 06 10:43 AM
change format of phone field from text to phone Jim Outlook - Using Contacts 1 May 19th 06 01:29 AM
Receptionist needing a phone memo form to email phone messages. Kathy Outlook - Using Forms 1 March 3rd 06 11:07 AM


All times are GMT +1. The time now is 08:25 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2024 Outlook Banter.
The comments are property of their posters.