View Single Post
  #2  
Old June 9th 06, 05:30 AM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default move phone numbers from company field to business field

Am Thu, 8 Jun 2006 19:27:01 -0700 schrieb Tyson:

Tyson, this sample should do it:

Public Sub ExportContactsAsVCard()
Dim obj As Object
Dim Contact as Outlook.ContactItem
Dim Items As Outlook.Items

Set Items = Application.Session.GetDefaultFolder(olFolderConta cts).Items
For Each obj In Items
If TypeOf obj Is Outlook.ContactItem Then
Set Contact=obj
Contact.BusinessTelephoneNumber=Contact.CompanyMai nTelephoneNumber
Contact.CompanyMainTelephoneNumber=vbNullString
Contact.Save
End If
Next
End Sub


--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


Hello-

I need to move the phone numbers from the 'company' field to the

'business'
field for approximately 800 contacts.

not all contacts have a number in the 'company' field.

the company field should be blank after the move.

please help.

Thanks,

Tyson

Ads