MailMergeDataField.Index プロパティ (Publisher)
Returns a Long that represents the position of a particular item in a specified collection.
構文
式。インデックス
式MailMergeDataField オブジェクトを表す変数。
例
次の例では、 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
次の例では 、Plate コレクションをループ処理し、各プレートの 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 のサポートおよびフィードバックを参照してください。
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示