共用方式為


Publisher) (MailMergeDataField.Index 屬性

會傳回 Long ,代表指定集合中特定專案的位置。

語法

運算式指數

表達 代表 MailMergeDataField 物件的 變數。

範例

下列範例會迴圈查看 MailMergeDataFields 集合,並顯示每個欄位的 IndexName 屬性。

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 集合,並顯示每個分色板的 IndexName 屬性。

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 支援與意見反應