Fields interface

A collection of Field objects that represent all the fields in a selection, range, or document.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

[GuidAttribute("00020930-0000-0000-C000-000000000046")]
public interface Fields : IEnumerable

Use the Fields property to return the Fields collection.

Use the Add method to add a field to the Fields collection.

Use Fields(index), where index is the index number, to return a single Field object. The index number represents the position of the field in the selection, range, or document.

Use the Fields property with a MailMerge object to return the MailMergeFields collection.

The Count property for this collection in a document returns the number of items in the main story only. To count items in other stories use the collection with the Range object.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft