FirstRecord Property

Microsoft Publisher Visual Basic

expression.FirstRecord

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

This example sets the active record as the first record to be merged, and then merges three records ending with the record two records forward in the data source. This example assumes that the active publication is a mail merge document.

Sub RecordOne()
    With ActiveDocument.MailMerge
        .DataSource.FirstRecord = .DataSource.ActiveRecord
        .DataSource.LastRecord = .DataSource.ActiveRecord + 2
        .Execute Pause:=True
    End With
End Sub