View Single Post
  #8  
Old August 21st 06, 11:24 PM posted to microsoft.public.outlook.contacts,microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default 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"


Ads