Need to know if outlook 2010 delete country codes

Asked By 0 points N/A Posted on -
qa-featured

Hi everybody,

Is it possible that outlook 2010 delete country codes from contacts. Many thank

SHARE
Best Answer by Sharath Reddy
Answered By 0 points N/A #135060

Need to know if outlook 2010 delete country codes

qa-featured

Hi,

Outlook 2010 does not add or even delete the country codes from contacts except you set it to. Check or uncheck the options, add or remove the country codes from your contact numbers. There is no reason for your sync program not to be capable to handle it. Outlook 2010 utilize only usual format. If you want a bit special, you should accommodate that.

 

Best regards,

Heather marie

Best Answer
Best Answer
Answered By 562865 points N/A #135061

Need to know if outlook 2010 delete country codes

qa-featured

I have found a solution to this by creating a macro and running it on Microsoft Outlook 2010 but the only problem I see now is whether if it’ll work on your version of Microsoft Office Outlook or not since the macro I found was intended to run on the 2007 version of Microsoft Office Outlook. But anyway, here is the macro. To create the macro, go to VBA in Microsoft Office Outlook then create a module. Copy the macro below then run it.

Sub CorrectContactInfo()

'I Have used " _" to break long statements into multiple lines (read without the quotes)

'Check for number of contacts

Dim ContactsFolder As Folder

Set ContactsFolder = Session.GetDefaultFolder(olFolderContacts)

MsgBox ("Contacts Found: " & ContactsFolder.Items.Count)

 

'Run to identify and make changes

'Declare Variables

Dim Contact As ContactItem

Dim Pos As Integer

Dim i As Integer

Dim j As Integer

Dim k As Integer

Dim StrLength As Integer

 

'Initialize default values

i , j, k = 0

 

'Iterate for each contact in the address book

For Each Contact In ContactsFolder.Items

 

i = i + 1 'for validating results

Pos = 0 'Inside the loop value reser for each iteration

 

Pos = InStr(1, _

Contact.BusinessTelephoneNumber, _

"0", _

vbBinaryCompare) 'replace "0" to search for the required value

'Also, BusinessTelephoneNumber is one of the firelds…

'Change accordingly

 

StrLength = 0 'Initializing the variable

StrLength = Len(Contact.BusinessTelephoneNumber) 'get string length

If Pos = 1 Then 'If the substring is found at the beginning

 

j = j + 1 'checks for how many were selected for modification

'Press Ctrl+G (required only once ) to be able to view Debug info window

Debug.Print "To be changed:" & Contact.BusinessTelephoneNumber

Contact.BusinessTelephoneNumber = _

Replace(Contact.BusinessTelephoneNumber, _

"0", _

"+91", _

1, _

1, _

vbBinaryCompare) 'it does only one repalce 'cuz of the choose parameters.

'Change "0" to what ever substring is to be replaced

'Change "+91" to what ever subrtring is to required

Contact.Save 'Save changes, can be commented out for dry run

 

'Press Ctrl+G to be able to view Debug info window

Debug.Print "Changed To:" & Contact.BusinessTelephoneNumber

Else

'Checks how many were not processed

k = k + 1

'Press Ctrl+G to be able to view Debug info window

Debug.Print "Untouched:" & Contact.BusinessTelephoneNumber

End If

Next

Debug.Print "Number of Contacts parsed =" & i

Debug.Print "Number of contacts for modification =" & j

Debug.Print "Number of untouched contacts =" & k

End Sub

Answered By 0 points N/A #135062

Need to know if outlook 2010 delete country codes

qa-featured

Both solutions are good. Sharath Reddy, your solution is excellent and easy among those. By following your system, now I am able to run the 2007 version of Microsoft Office Outlook. Thanks for helping me to create macro and for providing the advice on how I will run the macro . Before reading your solution, I had no idea how I will do that. Thanks again Sharath.

Login/Register to Answer

Related Questions