FieldType Property
Collapse the table of content
Expand the table of content
The document is archived and information here might be outdated

MailMergeDataField.FieldType Property

Office 2007
Returns a pbMailMergeDataFieldType constant that represents the type of data contained in the data field.



expression   A variable that represents a MailMergeDataField object.

Return Value


Use the Insert method of the MailMergeDataFields collection to add a picture data field to a publication's catalog merge area.

Use the InsertMailMergeField method of the TextRange object to add a text data field to a text box in the publication's catalog merge area.

The FieldType property value can be one of the PbMailMergeDataFieldType constants declared in the Microsoft Office Publisher type library.


This example defines a data field as a picture data field, inserts it into the catalog merge area of the specified publication, and sizes and positions the picture data field. This example assumes that the publication has been connected to a data source, and that a catalog merge area has been added to the publication.

Visual Basic for Applications
Dim pbPictureField1 As Shape

    'Define the Photo field as a picture data type
    With ThisDocument.MailMerge.DataSource.DataFields
        .Item("Photo:").FieldType = pbMailMergeDataFieldPicture
    End With
    'Insert a picture field, then size and position it
    Set pbPictureField1 = ThisDocument.MailMerge.DataSource.DataFields.Item("Photo:").Insert
        With pbPictureField1
            .Height = 100
            .Width = 100
            .Top = 85
            .Left = 375
        End With

© 2016 Microsoft