Article ID: 166333
Article Last Modified on 1/19/2007
APPLIES TO
- Microsoft Outlook 97 Standard Edition
This article was previously published under Q166333
SYMPTOMS
Importing contacts into Microsoft Outlook 97 results in incorrectly formatted or parsed address and fax number fields. Although the information may look correct when viewed in an Outlook form, it may result in erratic behavior when other routines or programs use the information.
This article outlines a procedure using VBScript to correct this.
STATUS
Microsoft has confirmed this to be a problem in Microsoft Outlook 97 for Windows. This problem was corrected in Microsoft Outlook 97 version 8.02 for Windows.
MORE INFORMATION
Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:
Follow these steps to create a new post form to correct the imported contact records.
Design a New Post Form
- Open a new post message:
- On the File menu of Inbox, point to New, and then click "Post in This Folder."
- On the Tools menu of the new Post form, click Design Outlook Form.
- Insert a Command Button on the new form:
- Click the (P.2) tab to go to a blank page on the form.
- On the Form menu, click Control Toolbox.
- In the Toolbox, click CommandButton and drag it to the blank form page.
- Right-click CommandButton1 and click Properties.
- In the Caption window type "Correct Contacts" and click OK.
- Insert VBScript code:
- On the Form menu, click View Code to open the Script Editor.
In the Script Editor, type or copy the following code:
Sub CommandButton1_Click() 'This will only work on contacts in the CURRENT folder Set CurFolder=Application.ActiveExplorer.CurrentFolder If CurFolder.DefaultItemType=2 Then MsgBox "This process may take some time. You will be notified" & _ " when complete.",,"Contact Tools Message" Set MyItems=CurFolder.Items For i = 1 to MyItems.Count Set MyItem=MyItems.Item(i) MyItem.MailingAddressStreet=MyItem.MailingAddressStreet MyItem.MailingAddressCity=MyItem.MailingAddressCity MyItem.MailingAddressState=MyItem.MailingAddressState MyItem.MailingAddressPostalCode=MyItem.MailingAddressPostalCode MyItem.MailingAddressPostOfficeBox=MyItem.MailingAddressPostOfficeBox MyItem.CompanyName=MyItem.CompanyName MyItem.HomeFaxNumber=MyItem.HomeFaxNumber MyItem.BusinessFaxNumber=MyItem.BusinessFaxNumber MyItem.OtherFaxNumber=MyItem.OtherFaxNumber MyItem.EMail1Address=MyItem.EMail1Address MyItem.EMail2Address=MyItem.EMail2Address MyItem.EMail3Address=MyItem.EMail3Address MyItem.Body=MyItem.Body MyItem.Sensitivity=MyItem.Sensitivity MyItem.Save Next MsgBox "Done!",64,"Contact Tools Message" Else MsgBox "The current folder is not a Contact folder.",64,"Contact" & _ " Tools Message" End If End Sub
- On the File menu in Script Editor, click Close to return to the form.
- Rename the second page (p.2) tab and publish the new form:
- On the Form menu, click Rename Page.
- Type a name for this page such as, Correct Contacts, and click OK.
- On the File menu, click Publish Form As.
- In the "Form Name" box, type a name for your new form such as Correct Contacts and then click the "Publish In" button.
- Click Forms Library and click Personal Forms in the drop-down list.
- Click OK and click Publish.
- Close the message without saving.
To Use Your New Form
- Navigate to the folder containing the contacts you want to correct.
- On the Contacts menu, click Choose Form.
- In the Personal Forms list, click your new form and click OK.
- Click the second page tab and click the button (Correct Contacts from Step 2e above) to correct the contacts in the current folder.
NOTE: This only affects contact names in the current folder.
REFERENCES
For information about manually correcting individual records, please see the following articles in the Microsoft Knowledge Base:
164401 OL97: Fields Missing Inserting a Contact into Word
164408 OL97: Imported Fax Numbers May Not Work in Outlook
164477 OL97: Address Displays Incorrectly on Imported Contacts
For more information about creating solutions with Microsoft Outlook 97, please see the following articles in the Microsoft Knowledge Base:
166368 OL97: How to Get Help Programming with Outlook
170783 OL97: Q&A: Questions about Customizing or Programming Outlook
Additional query words: OutSol OutSol97 parse format
Keywords: kbbug kbfix kbhowto KB166333