Provides data for the MergeField event.
The MergeField event occurs during mail merge when a simple mail merge field is encountered in the document. You can respond to this event to return text for the mail merge engine to insert into the document.
Shows how to execute a mail merge with a custom callback that handles merge data in the form of HTML documents.
#include <Aspose.Words.Cpp/MailMerging/FieldMergingArgs.h>
Public Member Functions | |
String | get_Text () const |
Gets or sets the text that will be inserted into the document for the current merge field. More... | |
virtual const TypeInfo & | GetType () const override |
virtual bool | Is (const TypeInfo &target) const override |
void | set_Text (const String &value) |
Setter for get_Text. More... | |
![]() | |
const SharedPtr< Document > & | get_Document () const |
Returns the Document object for which the mail merge is performed. More... | |
String | get_DocumentFieldName () const |
Gets the name of the merge field as specified in the document. More... | |
const SharedPtr< FieldMergeField > & | get_Field () const |
Gets the object that represents the current merge field. More... | |
String | get_FieldName () const |
Gets the name of the merge field in the data source. More... | |
const SharedPtr< Object > & | get_FieldValue () const |
Gets the value of the field from the data source. More... | |
int32_t | get_RecordIndex () const |
Gets the zero based index of the record that is being merged. More... | |
String | get_TableName () const |
Gets the name of the data table for the current merge operation or empty string if the name is not available. More... | |
virtual const TypeInfo & | GetType () const override |
virtual bool | Is (const TypeInfo &target) const override |
void | set_FieldValue (const SharedPtr< Object > &value) |
Sets the value of the field from the data source. More... | |
Static Public Member Functions | |
static const TypeInfo & | Type () |
![]() | |
static const TypeInfo & | Type () |
System::String Aspose::Words::MailMerging::FieldMergingArgs::get_Text | ( | ) | const |
Gets or sets the text that will be inserted into the document for the current merge field.
When your event handler is called, this property is set to null.
If you leave Text as null, the mail merge engine will insert FieldValue in place of the merge field.
If you set Text to any string (including empty), the string will be inserted into the document in place of the merge field.
Shows how to execute a mail merge with a custom callback that handles merge data in the form of HTML documents.
|
overridevirtual |
Reimplemented from Aspose::Words::MailMerging::FieldMergingArgsBase.
|
overridevirtual |
Reimplemented from Aspose::Words::MailMerging::FieldMergingArgsBase.
void Aspose::Words::MailMerging::FieldMergingArgs::set_Text | ( | const System::String & | value | ) |
|
static |