Name Property

Applies To:

Field object


Name of the field.


BSTR/String Field.Name
BSTR/String Field


This is the default member of the Field Object; thus you do not need use the Name extension explicitly.


The following VB code gets the Name of  the second field in the document:

Dim FinderApp As Object       'Application
Dim CurrentField As Object    'Field
Dim FieldName As String       'Field name

'Set document to active document
Set FinderDoc = FinderApp.ActiveDocument
'Set current field to field 2
Set CurrentField = FinderDoc.Fields(2)
'Get the name NOTE: ".Name" is implicit
FieldName = CurrentField   

See Also:

2005 CambridgeSoft Corporation. All Rights Reserved. Privacy Statement
Tel  800 315-7300 / 617 588-9300     Fax  617 588-9390     Email
CambridgeSoft Corporation, 100 CambridgePark Drive, Cambridge, MA 02140 USA