# Index Property

A read-only property that returns the 0-based index of the form that is currently being merged.

expression.Index

expression Required. An expression that returns a reference to a MergeEvent object.

## Security Level

0: Can be accessed without restrictions.

## Remarks

The value of the Index property of the MergeEvent object increases from 0 to Count-1 for each merge event that occurs when forms are merged.

When used in combination with the Count property of the MergeEvent object, the Index property can be used to determine when the last form has been merged.

Note This object model member is not supported when the Disable Service Pack features option on the Advanced tab of the Options dialog box in InfoPath is selected or when Microsoft Office 2003 Service Pack 1 or later is not installed. Any form that implements this object model member in its code will generate an error message if it is opened in InfoPath when service pack features are disabled or unavailable.

## Example

This example shows how to use the Index property along with the Count property of an instance of the MergeEvent object to determine if the current form is the last form to be merged:

    var fLast = eventObj.Index + 1 == eventObj.Count;

©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp