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"