G
Guy
I am using the following code:
Sub ChangeNumber()
Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set myFolder = _
myNameSpace.GetDefaultFolder(olFolderContacts)
Set itmContact = myFolder.Items
Dim I As Integer
For I = 1 To itmContact.Count
If Left(itmContact(I).BusinessTelephoneNumber, 4)
= "+972" Then
bphone = itmContact(I).BusinessTelephoneNumber
itmContact(I).BusinessTelephoneNumber.erase
itmContact(I).BusinessTelephoneNumber = "0" + Mid
(bphone, 7, 1) + "-" + Mid(bphone, 10, 10)
itmContact(I).Save
End If
Next
End Sub
It is not changing the telephone number. At some point
when i was stepping through the code, it worked, but when
i ran the macro it did not work. I do not know what i did
to make it work.
Sub ChangeNumber()
Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set myFolder = _
myNameSpace.GetDefaultFolder(olFolderContacts)
Set itmContact = myFolder.Items
Dim I As Integer
For I = 1 To itmContact.Count
If Left(itmContact(I).BusinessTelephoneNumber, 4)
= "+972" Then
bphone = itmContact(I).BusinessTelephoneNumber
itmContact(I).BusinessTelephoneNumber.erase
itmContact(I).BusinessTelephoneNumber = "0" + Mid
(bphone, 7, 1) + "-" + Mid(bphone, 10, 10)
itmContact(I).Save
End If
Next
End Sub
It is not changing the telephone number. At some point
when i was stepping through the code, it worked, but when
i ran the macro it did not work. I do not know what i did
to make it work.