Outlook / Nokia PC Sync fix

This macro is designed to assist in one-way sync operations from Outlook to a Nokia phone using¬†Nokia PC Suite. It converts name fields such that you can find contacts by the “File As” field on your phone. It also performs phone number processing, converting alphas to numbers, commas to pauses (p), and eXtension specifiers to waits (w). The conversion takes place while copying the contacts over to a “Nokia Contacts” folder (path is “Personal Folders\Contacts\Nokia Contacts”). You can then configure Nokia PC Sync to synchronize your contacts out of this folder.

It is recommended you read the details below before running this macro.

' WARNING
'
' Make sure you have a good backup of your Outlook data prior to messing
' with this macro.  This macro has only been tested with Outlook 2000 SP3
' and Nokia PC Sync 6.81.13.0.
'
' HISTORY
'
' In my humble opinion, Nokia PC Suite does a pretty poor job of syncing data
' to your phone.  It has NO field customization capability built into the
' product that I could find.  On my phone, I ended up with a bunch of contacts
' with no name. So I wrote this Outlook macro to be a little bit smarter about
' syncing data to my Nokia 2865i.
'
' SUMMARY
'
' This macro is designed for one-way sync from Outlook to a Nokia phone.  It
' converts name fields such that you can find contacts by the "File As"
' field on your phone.  It also has some pretty fancy phone number processing,
' converting alphas to numbers, commas to pauses (p), and eXtension specifiers
' to waits (w).  The conversion takes place while copying the contacts over to
' a "Nokia Contacts" folder (path is
' "Personal Folders\Contacts\Nokia Contacts").  You can then
' configure Nokia PC Sync to synchronize your contacts out of this folder.
'
' It is recommended you read the details below before running this macro.
'
' DETAILS
'
' This user form simply starts processing Nokia Contacts when activated,
' copying them to the subfolder "Nokia Contacts" under the "Contacts" folder.
' (If the folder doesn't exist, it is created.  If it does exist, it is
' cleared.)  The macro then iterates through ALL contacts in the main
' "Contacts" folder and creates a copy of each contact. The FirstName,
' CompanyName, MiddleName, Suffix, and Title are cleared.  The LastName field
' is populated with the FileAs field.  Each phone number field is parsed for
' pauses (p), waits (w), and alpha conversions to numerics.  For example:
'
'   123-555-1212x1234 is converted to 1235551212w1234.
'   123-555-1212,,,1234 is converted to 1235551212ppp1234.
'   #TOW is converted to #869.
'
'
' ONE CLICK OPERATION
'
' It is recommended that you create a macro in "ThisOutlookSession" that
' reads as follows:
'
'Sub Nokia()
'    Load NokiaPCSuiteContacts
'    NokiaPCSuiteContacts.Show
'End Sub
'
' You can then assign this simple macro to a toolbar button in Outlook for
' one click Nokia Contact update.  See Outlook help if in doubt.
'
' You should run the macro once before continuing with the instructions
' below...
'
'
' CONFIGURING NOKIA PC SUITE SYNC
'
' After running this macro, you'll need to update Nokia PC Suite settings:
'   1) Open Nokia PC Sync Settings page.
'   2) General Tab - click Advanced.
'   3) Click "Direction" tab.
'   4) Select "Only update Microsoft Outlook data to the mobile phone."
'   5) Click OK to close the Advanced settings dialog.
'   6) Click on "Microsoft Outlook" tab.
'   7) Click on "Select Folders".
'   8) Next to Contacts field, click "Browse" button.
'   9) Select the newly created Nokia Contacts folder.
'  10) Click OK to exit out of the folder browse dialog.
'  11) Click OK to exit out of the Sync settings window.
'
' IMPORTANT NOTES:
'
'   - Each time you run the macro, the "Nokia Contacts" folder is fully
'     repopulated.  When you tell Nokia Sync to run, it pops a dialog warning
'     you that Nokia PC Sync has detected "missing or deleted" items in
'     Microsoft Outlook.  Be sure to tell it to "Delete items from the Nokia
'     Mobile Phone."  Unfortunately, there is no way to prevent these dialogs.
'
'   - The macro is programmed to work in the USA/Canada with USA/Canada phone
'     numbers, but has been designed for international phone numbers.
'     If you are somewhat familiar with VB, read on for more details on how to
'     customize things.
'
'   - The Body field (contact comments) and "Account" field are blanked out
'     to prevent confidential information from being loaded onto my mobile
'     phone.
'
' SIMPLE CUSTOMIZATION
'
' NOTE: On my Nokia 2865i, LastName is the displayed name... in all cases, at
' least on my phone, I want this to be the name field.  On smartphones, this
' may not be the best choice!  Modify this macro to suite your needs.
'
' For proper parsing, the macro needs to know how long a phone number is for
' a given country code.  You can update the table in the VB code to
' accommodate the country codes you are using.  Also, if you aren't in the
' USA/Canada, be sure to update the DEFAULT_COUNTRY_CODE constant defined
' below.
'
'
' MIT LICENSE (http://www.opensource.org/licenses/mit-license.php)
'
' Copyright (c) 2006 Andrew Koransky (andrew(at)koransky.com)
'
' Permission is hereby granted, free of charge, to any person obtaining a
' copy of this software and associated documentation files (the "Software"),
' to deal in the Software without restriction, including without limitation
' the rights to use, copy, modify, merge, publish, distribute, sublicense,
' and/or sell copies of the Software, and to permit persons to whom the
' Software is furnished to do so, subject to the following conditions:
'
' The above copyright notice and this permission notice shall be included in
' all copies or substantial portions of the Software.
'
' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
' IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
' FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
' LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
' FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
' DEALINGS IN THE SOFTWARE.

Click here to download.