Skip to content

Latest commit

 

History

History
62 lines (45 loc) · 1.48 KB

Publisher.MailMergeMappedDataField.Index.md

File metadata and controls

62 lines (45 loc) · 1.48 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
MailMergeMappedDataField.Index property (Publisher)
vbapb10.chm6553604
vbapb10.chm6553604
Publisher.MailMergeMappedDataField.Index
c590d1af-f845-7e1d-95bc-c65969ebd0ff
06/11/2019
medium

MailMergeMappedDataField.Index property (Publisher)

Returns a Long that represents the position of a particular item in a specified collection.

Syntax

expression.Index

expression A variable that represents a MailMergeMappedDataField object.

Example

The following example loops through the MailMergeDataFields collection and displays the Index and Name properties for each field.

Dim mmfLoop As MailMergeDataField 
 
With ActiveDocument.MailMerge.DataSource 
 If .DataFields.Count > 0 Then 
 For Each mmfLoop In .DataFields 
 Debug.Print "Field " & mmfLoop.Name _ 
 & " / Index " & mmfLoop.Index 
 Next mmfLoop 
 Else 
 Debug.Print "No fields to report." 
 End If 
End With

The following example loops through the Plates collection and displays the Index and Name properties for each plate.

Dim plaLoop As Plate 
 
If ActiveDocument.Plates.Count > 0 Then 
 For Each plaLoop In ActiveDocument.Plates 
 Debug.Print "Plate " & plaLoop.Name _ 
 & " / Index " & plaLoop.Index 
 Next plaLoop 
Else 
 Debug.Print "No plates to report." 
End If

[!includeSupport and feedback]