|Publisher Developer Reference|
Version Added: Publisher 2007
expression.EditRecord(lRec, varField, Value)
expression A variable that represents a MailMergeDataSource object.
|lRec||Required||Long||The ID of the record you want to edit.|
|varField||Required||Variant||The data field (column) that contains the value you want to change.|
|Value||Required||Variant||The value to be changed.|
You can use the EditRecord method to correct data source information that is in error, such as an outdated recipient address.
The EditRecord method does not make any changes to the individual data sources that together make up the master data source.
The following Microsoft Visual Basic for Applications (VBA) macro shows how to use the EditRecord method to change the value of a single column in a particular record in the master data source (the combined mail-merge recipient list).
Before running this macro, replace recordID with the index number of the record in the data source that you want to edit; replace fieldname with the name of the field (column) in the record that you want to edit; and replace value with the new value you want to set for the field.
|Visual Basic for Applications|