![]() |
|
|
| Become a Columnist Microsoft Exchange Site Microsoft Support SiteMSDN Exchange Site | ||
|
|
Sort Outlook address book by last name This code will sort the Outlook address book by last name. It will also reset the order to first name if needed. The complete instructions are in a KB article at http://www.microsoft.com/kb/articles/Q165/1/39.htm but there are some problems with the code there. The Code Sub CommandButton1_Click() Set
CurFolder=Application.ActiveExplorer.CurrentFolder MsgBox "This process may
take some time. You will be notified when" & _ If
Trim(MyItem.LastNameandFirstName)<>"" Then Next MsgBox "Done sorting Outlook
Address Book contacts by Last" & _ Else MsgBox "The current folder
is not a Contact folder.",64,"Contact" & _ End If End Sub Sub CommandButton2_Click() 'This will reset contacts in CURRENT folder to FirstName LastName Set CurFolder=Application.ActiveExplorer.CurrentFolder If CurFolder.DefaultItemType=2 Then MsgBox "This process may
take some time. You will be notified when" & _ For i = 1 to MyItems.Count If
Trim(MyItem.FullName)<>"" Then Next MsgBox "Done sorting Outlook
Address Book contacts by First" & _ Else MsgBox "The current folder
is not a Contact folder.",64,"Contact" & _ End If End Sub
|
Disclaimer: Your use of the information contained in these pages is at your sole risk. All information on these pages is provided "as is", without any warranty, whether express or implied, of its accuracy, completeness, fitness for a particular purpose, title or non-infringement, and none of the third-party products or information mentioned in the work are authored, recommended, supported or guaranteed by Stephen Bryant or Pro Exchange. OutlookExchange.Com, Stephen Bryant and Pro Exchange shall not be liable for any damages you may sustain by using this information, whether direct, indirect, special, incidental or consequential, even if it has been advised of the possibility of such damages.
Copyright Stephen Bryant 2008