• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help HTC Sync corrupting Email Addresses in Outlook 2010?

Having spent an hour or so learning enough Outlook VBA via Getting Started with VBA in Outlook 2010 and this snippet Change Contact's File As format I've managed to add some crude changes to the Updatemail macro to rewrite the FileAs field in "Last Name, Firstname" format which is what it was before HTC Sync 3 did its worst. (Modified code below.) This does the trick for me.

The final gripe is with the phone fields. If I put a Home Phone = 012345 6789 in the Microsoft Contact and then use HTC Sync 3 to copy this to Android 2.2 the space in the phone number is not stored. Has this been removed by HTC Sync 3? On a subsequent sync the space in the Outlook Contact is overwritten. Annoying. I'm not sure what to do about this one. Any ideas?

Paul

Code:
Sub UpdateMail()
Dim CurFolder
Dim MyItems
Dim MyItem
Dim NumItems, i
Dim sMail1, sMail2, sMail3
Dim sMailType1, sMailType2, sMailType3
Dim sMailFileAs As String

' Use whichever folder is currently selected
Set CurFolder = Application.ActiveExplorer.CurrentFolder

' Make sure it's a contact folder
If CurFolder.DefaultItemType = 2 Then

If MsgBox("This process may take some time. You will be notified when complete.", vbOKCancel, "Contact Tools Message") = vbOK Then

Set MyItems = CurFolder.Items
NumItems = MyItems.Count
For i = 1 To NumItems
Set MyItem = MyItems.Item(i)

If TypeName(MyItem) = "ContactItem" Then

Debug.Print MyItem

sMail1 = ""
sMail2 = ""
sMail3 = ""
sMailType1 = ""
sMailType2 = ""
sMailType3 = ""

sMailFileAs = ""

sMail1 = MyItem.Email1Address
sMail2 = MyItem.Email2Address
sMail3 = MyItem.Email3Address

sMailFileAs = MyItem.LastNameAndFirstName

sMailType1 = MyItem.Email1AddressType
sMailType2 = MyItem.Email3AddressType
sMailType3 = MyItem.Email3AddressType


MyItem.Email1Address = ""
MyItem.Email1Address = ""
MyItem.Email1Address = ""
MyItem.Email1DisplayName = ""
MyItem.Email2DisplayName = ""
MyItem.Email3DisplayName = ""

MyItem.FileAs = sMailFileAs

MyItem.Save

If Trim(sMail1) > "" Then
MyItem.Email1Address = sMail1
End If
If Trim(sMail2) > "" Then
MyItem.Email2Address = sMail2
End If
If Trim(sMail3) > "" Then
MyItem.Email3Address = sMail3
End If
MyItem.Save

End If

Next
End If


MsgBox "Finished updating contacts."

Else

MsgBox "The current folder must be a contacts folder."

End If

Set MyItem = Nothing
Set MyItems = Nothing
Set CurFolder = Nothing
End Sub
 
Upvote 0
That script is a great solution, many thanks for that

I can also highly recommend gSyncit from http://www.daveswebsite.com/software/gsync/

It runs as an addin to Outlook and syncs all of your Outlook contacts with Google Contacts, and of course the Android handset can automatically sync that.

Since it all happens online (scheduled two-way sync within Outlook every hour, automatic sync whenever the handset is online), it provides an easier sync than HTC Sync itself.
 
Upvote 0
Upvote 0
Yet another reason I never wanted or have sync'd to Outlook with my old Palm Treo since they had a stand alone PIM since the being before anyone new what a smartphone was. I still use it however HTC and many other smartphone players are taking the cheap way out and supplying a conduit only. LG however does have a PIM for the Shine Plus, good work LG but HTC I guess is small potatoes to LG and can't invest in a PIM organizer for syncing to and backup or data entry then back to the phone.
 
Upvote 0
I had synch working fine between my Legend and Outlook 2010 using the previous version of HTC. However since upgrading to the latest version thsi week, I have (a) started having the "None of your e-mail accounts could send to this recipient" issue from time to time and (b) new contacts and diary entries are not appearing in Outlook.

I would appreciate suggestions to fix both problems. It is drivin me nuts. I had been so pleased with the phone and the PDA capability and synching until this.

Thanks
C
 
Upvote 0
I just registered to thank you.
I modified a little the great macro juxx published. In my case the problem was with SMPT instead SMTP in EmailXAddressType (HTC Desire - Outlook 2003). Only correcting this value everything works correctly.


If sMailType1 = "SMPT" Then
MyItem.Email1AddressType = "SMTP"
End If
If sMailType2 = "SMPT" Then
MyItem.Email2AddressType = "SMTP"
End If
If sMailType3 = "SMPT" Then
MyItem.Email3AddressType = "SMTP"
End If
 
Upvote 0
Lars, quite simple really. Outlook identifies email addresses using SMTP as a one of the protocols. HTC Sync has a coding error where it posts data back to Outlook using SMPT (note the spelling mistake). So Outlook doesnt know what SMPT format is, hence displays the email 'Display As' with the email address only and you will get a delivery error as Outlook is trying to send in SMPT mode which doesnt exist.
Suggest you go to Outlook and in your contacts, set up a filter where Email Address Type = 'SMPT' and you will see a list of records HTC has corrupted.
 
Upvote 0
I've experienced that problem recently, too. htc desire hd: with htc sync. Nothing helped, but to completely erase htc sync from my computer as whenever I uninstalled and or reinstalled either outloook 2010 and or htc sync, the same problem again occured due to htc sync's failure to produce "stmp instead of smtp". So I now use "my phone explorer" instead and everything is fine now. I'd like to add another question: Is there an app with which I might synchronize my outlook notes and tasks? I would appreciate a proposal what and where to get such app. There's one for the iPhone as I know, but how to get one for my htc.:cool::cool:
 
Upvote 0
I just registered to thank you and add a bit of info (another one... duh...).

' Crazy stunt to "reset" the FileAs correctly.
sMailFileAs = MyItem.FileAs
MyItem.FileAs = ""
MyItem.FileAs = sMailFileAs

One of the main "bug" left after merging together the pieces of VB-for-Outlook was the fact that NOT all my contacts were Last,First.
All my contacts without First or Last name, with only a Company name, would appear at the beginning of my Contact list (Address card View), with nothing on the title line.
When opening the Contact, the FileAs was still intact, but unused by Outlook!!! I then noticed that doing "Copy", "Delete", "Tab" (to change field), "Shift Tab" (back to FileAs), "Paste", "Alt<S>" manually on all my contacts solved that part. This, added to the code found on this thread to solve the other issues, saved my data in Outlook. I can now trash HTC Sync and give a shot to MyPhoneExplorer.

Thanks again people! Carmin.
(ps: if requested, I'll post the "complete" VB code and the way to execute it in Outlook but it seemed from reading this that it's not needed).
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones