![]() |
|
displaying international format phone numbers
OL 2002 SP3
Win XP HE Follow-up to: microsoft.public.outlook.contacts Hi, I have a folder with hundreds of contacts. All telephone numbers display as +12129999999 I would like to have them all display as +1 (212) 999-9999 It does automatically change to that if I manually open the contact and click on the little pencil icon to the right of the phone number field. However, I can't really do this manually for hundred's of contacts. How can I automate this? Thanks a lot. |
displaying international format phone numbers
stef stef.bm_at_hotmail.removethis.com wrote:
I have a folder with hundreds of contacts. All telephone numbers display as +12129999999 I would like to have them all display as +1 (212) 999-9999 It does automatically change to that if I manually open the contact and click on the little pencil icon to the right of the phone number field. However, I can't really do this manually for hundred's of contacts. How can I automate this? I don't know if it will help, but see this tool: http://www.slovaktech.com/phonechanger.htm -- Brian Tillman |
displaying international format phone numbers
Try the Format function. In your case, it might look like this:
strX = Format(objC.BusinessTelephoneNumber, "+1 (@@@) @@@-@@@@") objC.BusinessTelephoneNumber = strX -- Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "stef" wrote: OL 2002 SP3 Win XP HE Follow-up to: microsoft.public.outlook.contacts Hi, I have a folder with hundreds of contacts. All telephone numbers display as +12129999999 I would like to have them all display as +1 (212) 999-9999 It does automatically change to that if I manually open the contact and click on the little pencil icon to the right of the phone number field. However, I can't really do this manually for hundred's of contacts. How can I automate this? Thanks a lot. |
displaying international format phone numbers
Eric Legault [MVP - Outlook] wrote:
Try the Format function. In your case, it might look like this: strX = Format(objC.BusinessTelephoneNumber, "+1 (@@@) @@@-@@@@") objC.BusinessTelephoneNumber = strX Eric, that's sounds good. thanks. however, i only need to run this in ONE Contacts subfolder called ABC (for example). how do I run the code on that folder only? |
displaying international format phone numbers
Brian Tillman wrote:
stef stef.bm_at_hotmail.removethis.com wrote: I have a folder with hundreds of contacts. All telephone numbers display as +12129999999 I would like to have them all display as +1 (212) 999-9999 It does automatically change to that if I manually open the contact and click on the little pencil icon to the right of the phone number field. However, I can't really do this manually for hundred's of contacts. How can I automate this? I don't know if it will help, but see this tool: http://www.slovaktech.com/phonechanger.htm could be. i'm checking with ken, the author of this plug-in. |
displaying international format phone numbers
You can use the ActiveExplorer object to work with the selection in the
currently displayed folder and base your code on that: If ActiveExplorer.Selection.count = 0 Then Exit Sub For Each objC In ActiveExplorer.Selection objC.BusinessTelephoneNumber = your code here Next -- Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "stef" wrote: Eric Legault [MVP - Outlook] wrote: Try the Format function. In your case, it might look like this: strX = Format(objC.BusinessTelephoneNumber, "+1 (@@@) @@@-@@@@") objC.BusinessTelephoneNumber = strX Eric, that's sounds good. thanks. however, i only need to run this in ONE Contacts subfolder called ABC (for example). how do I run the code on that folder only? |
displaying international format phone numbers
Eric Legault [MVP - Outlook] wrote:
You can use the ActiveExplorer object to work with the selection in the currently displayed folder and base your code on that: If ActiveExplorer.Selection.count = 0 Then Exit Sub For Each objC In ActiveExplorer.Selection objC.BusinessTelephoneNumber = your code here Next Sorry Eric, I'm not experienced with VB. is this how the whole macro would read? "Sub ChangeTelFormat strX = Format(objC.BusinessTelephoneNumber, "+1 (@@@) @@@-@@@@") If ActiveExplorer.Selection.count = 0 Then Exit Sub For Each objC In ActiveExplorer.Selection objC.BusinessTelephoneNumber = strX Next End Sub" |
displaying international format phone numbers
Yes, but you'd also of course need to declare the variables:
Dim objC As Outlook.ContactItem Dim strX As String -- Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "stef" wrote: Eric Legault [MVP - Outlook] wrote: You can use the ActiveExplorer object to work with the selection in the currently displayed folder and base your code on that: If ActiveExplorer.Selection.count = 0 Then Exit Sub For Each objC In ActiveExplorer.Selection objC.BusinessTelephoneNumber = your code here Next Sorry Eric, I'm not experienced with VB. is this how the whole macro would read? "Sub ChangeTelFormat strX = Format(objC.BusinessTelephoneNumber, "+1 (@@@) @@@-@@@@") If ActiveExplorer.Selection.count = 0 Then Exit Sub For Each objC In ActiveExplorer.Selection objC.BusinessTelephoneNumber = strX Next End Sub" |
displaying international format phone numbers
Eric Legault [MVP - Outlook] wrote:
Yes, but you'd also of course need to declare the variables: Dim objC As Outlook.ContactItem Dim strX As String Eric, i must be doing something wrong as i'm getting an error message.... is there anyway i can get u to just spell it out for me out here, from beginning to end? that wd be most helpful. |
displaying international format phone numbers
Try this, but make sure to set a breakpoint on the Save line and do not
proceed with saving until you've verified that this Format function is changing the phone number as you'd expect. If ANY phone numbers don't meet the expected +########### format, they get all messed up. Sub ChangeTelFormat() Dim objC As Outlook.ContactItem Dim strX As String If ActiveExplorer.Selection.Count = 0 Then Exit Sub If ActiveExplorer.CurrentFolder.DefaultItemType olContactItem Then Exit Sub For Each objC In ActiveExplorer.Selection strX = Format(objC.BusinessTelephoneNumber, "+1 (@@@) @@@-@@@@") objC.BusinessTelephoneNumber = strX objC.Save Next Set objC = Nothing End Sub -- Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "stef" wrote: Eric Legault [MVP - Outlook] wrote: Yes, but you'd also of course need to declare the variables: Dim objC As Outlook.ContactItem Dim strX As String Eric, i must be doing something wrong as i'm getting an error message.... is there anyway i can get u to just spell it out for me out here, from beginning to end? that wd be most helpful. |
All times are GMT +1. The time now is 04:03 PM. |
|
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com