Microsoft Outlook troubleshooting

After importing your contacts from a PDA or other importing tools, you will most probably encounter a problem of assigning phone numbers to category "Other" rather than "Mobile" or "Main (seen as work)".

One way of solving this issue is importing the contacts to Excel using internal Outlook mechanism and moving the data from one column to another. The fun starts when the target column is filled with data and simple overwriting the data is troublesome. As a result we are facing manual data overwriting.

I'd like to suggest a simple solution that consists of starting a procedure in VisualBAsic4App, which will move a phone number  to category "Other" and overwrite the data that exists there.

Sub Changing_mobile_other_to_main()
Dim oContact As ContactItem
Dim oContactFolder As MAPIFolder
Dim Ile&, nCounter&, item As ContactItem
Ile = 0
oContactFolder = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderContacts)
For Each item In oContactFolder.Items
DoEvents()
Ile = Ile + 1
oContact = item
If Not oContact Is Nothing Then
With oContact
If Len(Trim(.PrimaryTelephoneNumber)) = 0 And _
Len(Trim(.OtherTelephoneNumber)) > 0 Then
.PrimaryTelephoneNumber = Trim(.OtherTelephoneNumber)
.Save()
nCounter = nCounter + 1
End If
End With
End If
If Not oContact Is Nothing Then oContact = Nothing
Next
If Not oContactFolder Is Nothing Then oContactFolder = Nothing
MsgBox nCounter & " for" & How many & " processed contacts.", _
vbInformation, "Machine by OShon VBATools.pl"
End Sub


The categories of a PDA can be freely altered. For inexperienced VBA users, please refer to the article on Installation and running macros.

Other parameters relating to PDAs (for Outlook 2007).

.AssistantTelephoneNumber
.Business2TelephoneNumber
.BusinessTelephoneNumber
.CallbackTelephoneNumber
.CarTelephoneNumber
.CompanyMainTelephoneNumber
.Home2TelephoneNumber
.HomeFaxNumber
.HomeTelephoneNumber
.MobileTelephoneNumber
.OtherFaxNumber
.OtherTelephoneNumber
.PagerNumber
.PrimaryTelephoneNumber
.RadioTelephoneNumber
.TelexNumber
© All rights reserved. No part or whole of this article may not be reproduced or published without prior permission.

Leave a comment

Fix Outlook
    Comment
Name

Organisation
Email address
Enter the sum of digits 5 and 4:
Notify me about new comments for this article (you need to provide a valid email address).