User-defined fields are not available when you perform a mail merge in Outlook 2000 (832565)
The information in this article applies to:
SYMPTOMSWhen you perform a mail merge by using a Microsoft Outlook
2000 Contacts folder, and you click the Insert Merge Field in
Microsoft Word, user-defined fields are not available.CAUSEThis behavior occurs if either one of the following
conditions is true:
- The user-defined fields are not associated with the Outlook
2000 Contacts folder that you selected for the mail merge.
- The custom form that contains user-defined fields is not
set as the default form for the Outlook 2000 Contacts folder that you want to
use for the mail merge.
RESOLUTIONTo resolve this behavior, you must associate the
user-defined fields with the Outlook 2000 Contacts folder before you perform
the mail merge. You can manually or programmatically associate the user-defined
fields with the specific Contacts folder. Method 1To manually associate the user-defined fields with your Contacts
folder, follow these steps:
- Start Outlook 2000.
- Click the Contacts folder that you want
to use in the mail merge.
- On the View menu, point to Current
View, and then click Customize Current
View.
- In the View Summary dialog box, click
Fields.
- In the Show Fields dialog box, click
New Field.
- In the Name box, type the user-defined
field name, in the Type list, click the field type of the
user-defined field, in the Format list, click the appropriate
format, and then click OK.
- Repeat step 2 through 6 to associate the user-defined
fields with the Contacts folder.
Method 2To programmatically associate the user-defined fields with the
Outlook 2000 Contacts folder, follow these steps:
- Set the custom form that contains user-defined fields as
the default form to the Outlook 2000 Contacts folder. To do so, follow these
steps:
- Start Outlook 2000.
- Click the Contacts folder that you
want to use for the mail merge.
- Right-click the folder, and then click
Properties.
- On the General tab, in the
When posting to this folder, use list, click
Forms.
- In the Choose Form dialog box, click
the custom form that contains the user-defined fields, click
Open, and then click OK.
- Use a Microsoft Visual Basic for Applications (VBA) script
to associate the user-defined fields in the custom form to the Outlook 2000
Contacts folder. To do so, follow these steps:
- On the Tools menu, point to
Forms, and then click Design This
Form.
- On the Edit menu, click
Select All, and then press DELETE.
- On the Form menu, click
Control Toolbox.
- In the Toolbox dialog box, drag the
CommandButton to the form.
- Right-click the CommnandButton, and
then click Properties.
- In the Name box, type
cmdUpdateFolderFields, and then click
OK.
- Paste the following code in the Script Editor. To do
so, follow these steps:
- On the Form menu, click
View Code.
- In the Script Editor dialog box,
paste the following code.
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to 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 requirements.
Sub cmdUpdateFolderFields_Click()
Set MyItem = Application.Session.PickFolder.Items.Add
For Each UP in myItem.UserProperties
MyItem.UserProperties.Add UP.Name, UP.Type, TRUE
Next
MsgBox "Done!"
End Sub
- On the Form menu, click Run
This Form.
- Click the CommandButton on the running
form.
- In the Select Folder dialog box, click
the Contacts folder, and then click
OK.
- In the VBScript dialog box, wait for
the Done! message to appear, and then click
OK.
- Close the form without saving the changes.
Modification Type: | Minor | Last Reviewed: | 1/9/2006 |
---|
Keywords: | kbprb KB832565 kbAudITPRO |
---|
|