Publisher) (MailMergeFilterCriterion.Index 屬性
會傳回 Long ,代表指定集合中特定專案的位置。
語法
運算式。指數
表達 代表 MailMergeFilterCriterion 物件的 變數。
範例
在下列範例中,會循環查看 MailMergeDataFields 集合,並顯示每個欄位的 Index 及 Name 屬性。
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
在下列範例中,會循環查看 Plates 集合,並顯示每個分色板的 Index 及 Name 屬性。
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
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。