Syntax
CountMergeFields()
Remarks
Returns the number of fields in the header record of the data source or in the header source attached to the active main document. CountMergeFields() returns 0 (zero) if the active document is not a main document, data source, or header source.
Example
This example inserts a list of merge field names in the active document:
For n = 1 To CountMergeFields() Insert MergeFieldName$(n) InsertPara Next
See Also
InsertMergeField, MergeFieldName$()