A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Macro to update imported contacts



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 2nd 09, 05:06 PM posted to microsoft.public.outlook.program_vba
Faraz A. Qureshi
external usenet poster
 
Posts: 6
Default Macro to update imported contacts

Upon transfer of my contacts from a cell to the Outlook contacts I have found
that the numbers are not being displayed in full and the country code is
missing.

Any idea/macro how to have all the contact numbers have a country code "+92"
(Pakistan) be inserted in all in a single go?

Thanx in advance.
--
Best Regards,

Faraz
Ads
  #2  
Old August 2nd 09, 08:47 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP][_3_]
external usenet poster
 
Posts: 465
Default Macro to update imported contacts

Please show the code you're using the set the value of the ContactItem phone
number properties.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Faraz A. Qureshi" wrote in
message ...
Upon transfer of my contacts from a cell to the Outlook contacts I have
found
that the numbers are not being displayed in full and the country code is
missing.

Any idea/macro how to have all the contact numbers have a country code
"+92"
(Pakistan) be inserted in all in a single go?

Thanx in advance.
--
Best Regards,

Faraz



  #3  
Old August 2nd 09, 10:17 PM posted to microsoft.public.outlook.program_vba
Faraz A. Qureshi
external usenet poster
 
Posts: 6
Default Macro to update imported contacts

I don't have any. In fact, that is what I am looking for!
--
Do check "Yes" if this post is helpful,
Best Regards,

Faraz


"Sue Mosher [MVP]" wrote:

Please show the code you're using the set the value of the ContactItem phone
number properties.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Faraz A. Qureshi" wrote in
message ...
Upon transfer of my contacts from a cell to the Outlook contacts I have
found
that the numbers are not being displayed in full and the country code is
missing.

Any idea/macro how to have all the contact numbers have a country code
"+92"
(Pakistan) be inserted in all in a single go?

Thanx in advance.
--
Best Regards,

Faraz




  #4  
Old August 2nd 09, 11:54 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP][_3_]
external usenet poster
 
Posts: 465
Default Macro to update imported contacts

Between the code samples listed at
http://www.outlookcode.com/article.aspx?ID=23 and the object browser (F2 in
VBA) to give you the names of fields, you should have everything you need to
put this together to meet your specific requirements.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Faraz A. Qureshi" wrote in
message ...
I don't have any. In fact, that is what I am looking for!
--
Do check "Yes" if this post is helpful,
Best Regards,

Faraz


"Sue Mosher [MVP]" wrote:

Please show the code you're using the set the value of the ContactItem
phone
number properties.

"Faraz A. Qureshi" wrote in
message ...
Upon transfer of my contacts from a cell to the Outlook contacts I have
found
that the numbers are not being displayed in full and the country code
is
missing.

Any idea/macro how to have all the contact numbers have a country code
"+92"
(Pakistan) be inserted in all in a single go?

Thanx in advance.
--
Best Regards,

Faraz






  #5  
Old August 3rd 09, 07:15 AM posted to microsoft.public.outlook.program_vba
Faraz A. Qureshi
external usenet poster
 
Posts: 6
Default Macro to update imported contacts

Sorry Sue,

Tried my level best but can't achieve/develop the required code. Can you
simply devise a code to change or add country code "+92" to all the existing
contacts' mobile/home office numbers?

--
Best Regards,

Faraz


"Sue Mosher [MVP]" wrote:

Between the code samples listed at
http://www.outlookcode.com/article.aspx?ID=23 and the object browser (F2 in
VBA) to give you the names of fields, you should have everything you need to
put this together to meet your specific requirements.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Faraz A. Qureshi" wrote in
message ...
I don't have any. In fact, that is what I am looking for!
--
Do check "Yes" if this post is helpful,
Best Regards,

Faraz


"Sue Mosher [MVP]" wrote:

Please show the code you're using the set the value of the ContactItem
phone
number properties.

"Faraz A. Qureshi" wrote in
message ...
Upon transfer of my contacts from a cell to the Outlook contacts I have
found
that the numbers are not being displayed in full and the country code
is
missing.

Any idea/macro how to have all the contact numbers have a country code
"+92"
(Pakistan) be inserted in all in a single go?

Thanx in advance.
--
Best Regards,

Faraz






  #6  
Old August 5th 09, 06:00 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP][_3_]
external usenet poster
 
Posts: 465
Default Macro to update imported contacts

It's very hard to help you figure you where you're going wrong unless you
share the code you've written and indicate where you have encountered
problems.

You might compare this with what you already have:

On Error Resume Next
Set objFolder = Application.session.GetDefaultFolder(olFolderConta cts)
If Not objFolder Is Nothing Then
Set objItems = objFolder.Items
For Each objItem In objItems
' make sure you have a Contact item
If objItem.Class = olContact Then
Set objContact = objItem
With objContact
.MobileTelephoneNumber = _
"+92 " & objContact.MobileTelephoneNumber
.BusinessTelephoneNumber = _
"+92 " & objContact.MobileTelephoneNumber
.Save
Next
End If
End If


--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Faraz A. Qureshi" wrote in
message ...
Sorry Sue,

Tried my level best but can't achieve/develop the required code. Can you
simply devise a code to change or add country code "+92" to all the
existing
contacts' mobile/home office numbers?

--
Best Regards,

Faraz


"Sue Mosher [MVP]" wrote:

Between the code samples listed at
http://www.outlookcode.com/article.aspx?ID=23 and the object browser (F2
in
VBA) to give you the names of fields, you should have everything you need
to
put this together to meet your specific requirements.

"Faraz A. Qureshi" wrote in
message ...
I don't have any. In fact, that is what I am looking for!
--
Do check "Yes" if this post is helpful,
Best Regards,

Faraz


"Sue Mosher [MVP]" wrote:

Please show the code you're using the set the value of the ContactItem
phone
number properties.

"Faraz A. Qureshi" wrote in
message ...
Upon transfer of my contacts from a cell to the Outlook contacts I
have
found
that the numbers are not being displayed in full and the country
code
is
missing.

Any idea/macro how to have all the contact numbers have a country
code
"+92"
(Pakistan) be inserted in all in a single go?

Thanx in advance.
--
Best Regards,

Faraz








  #7  
Old August 6th 09, 06:14 AM posted to microsoft.public.outlook.program_vba
Faraz A. Qureshi
external usenet poster
 
Posts: 6
Default Macro to update imported contacts

Thanx for all your help Sue,

The code works well enough! However, I did get to manage the same by
exporting the contacts to *.csv, inserting "+92 " to all via concatenating
and and then re-importing the same file.

Thanx again 4 all your help, I really appreciate the same!

--
Best Regards,

Faraz


"Sue Mosher [MVP]" wrote:

It's very hard to help you figure you where you're going wrong unless you
share the code you've written and indicate where you have encountered
problems.

You might compare this with what you already have:

On Error Resume Next
Set objFolder = Application.session.GetDefaultFolder(olFolderConta cts)
If Not objFolder Is Nothing Then
Set objItems = objFolder.Items
For Each objItem In objItems
' make sure you have a Contact item
If objItem.Class = olContact Then
Set objContact = objItem
With objContact
.MobileTelephoneNumber = _
"+92 " & objContact.MobileTelephoneNumber
.BusinessTelephoneNumber = _
"+92 " & objContact.MobileTelephoneNumber
.Save
Next
End If
End If


--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Faraz A. Qureshi" wrote in
message ...
Sorry Sue,

Tried my level best but can't achieve/develop the required code. Can you
simply devise a code to change or add country code "+92" to all the
existing
contacts' mobile/home office numbers?

--
Best Regards,

Faraz


"Sue Mosher [MVP]" wrote:

Between the code samples listed at
http://www.outlookcode.com/article.aspx?ID=23 and the object browser (F2
in
VBA) to give you the names of fields, you should have everything you need
to
put this together to meet your specific requirements.

"Faraz A. Qureshi" wrote in
message ...
I don't have any. In fact, that is what I am looking for!
--
Do check "Yes" if this post is helpful,
Best Regards,

Faraz


"Sue Mosher [MVP]" wrote:

Please show the code you're using the set the value of the ContactItem
phone
number properties.

"Faraz A. Qureshi" wrote in
message ...
Upon transfer of my contacts from a cell to the Outlook contacts I
have
found
that the numbers are not being displayed in full and the country
code
is
missing.

Any idea/macro how to have all the contact numbers have a country
code
"+92"
(Pakistan) be inserted in all in a single go?

Thanx in advance.
--
Best Regards,

Faraz









 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I update emails automatically to lists when I update contacts LearningCurve Outlook - Using Contacts 5 October 17th 07 11:22 AM
macro to update excel when email received into outlook folder [email protected] Outlook and VBA 1 July 17th 07 10:42 PM
update certificates for distibution list imported from personal a. denise m Outlook - Using Contacts 1 April 6th 06 09:53 PM
Macro to add calendar items from "birthday" field of imported cont Peter K. Outlook and VBA 2 April 6th 06 03:32 PM
Macro - Update Contacts - Categories Chris_Texas Outlook and VBA 4 February 21st 06 07:37 AM


All times are GMT +1. The time now is 09:11 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.