Aspose::Words::MailMerging::ImageFieldMergingArgs class

ImageFieldMergingArgs class

Provides data for the ImageFieldMerging() event. To learn more, visit the Mail Merge and Reporting documentation article.

class ImageFieldMergingArgs : public Aspose::Words::MailMerging::FieldMergingArgsBase

Methods

MethodDescription
get_Document() constReturns the Document object for which the mail merge is performed.
get_DocumentFieldName() constGets the name of the merge field as specified in the document.
get_Field() constGets the object that represents the current merge field.
get_FieldName() constGets the name of the merge field in the data source.
get_FieldValue() constGets the value of the field from the data source.
get_Image() constSpecifies the image that the mail merge engine must insert into the document.
get_ImageFileName() constSets the file name of the image that the mail merge engine must insert into the document.
get_ImageHeight() constSpecifies the image height for the image to insert into the document.
get_ImageStream() constSpecifies the stream for the mail merge engine to read an image from.
get_ImageWidth() constSpecifies the image width for the image to insert into the document.
get_RecordIndex() constGets the zero based index of the record that is being merged.
get_Shape() constSpecifies the shape that the mail merge engine must insert into the document.
get_TableName() constGets the name of the data table for the current merge operation or empty string if the name is not available.
GetType() const override
Is(const System::TypeInfo&) const override
set_FieldValue(const System::SharedPtr<System::Object>&)Sets the value of the field from the data source.
set_Image(const System::SharedPtr<System::Drawing::Image>&)Specifies the image that the mail merge engine must insert into the document.
set_ImageFileName(const System::String&)Sets the file name of the image that the mail merge engine must insert into the document.
set_ImageHeight(const System::SharedPtr<Aspose::Words::Fields::MergeFieldImageDimension>&)Setter for Aspose::Words::MailMerging::ImageFieldMergingArgs::get_ImageHeight.
set_ImageStream(const System::SharedPtr<System::IO::Stream>&)Specifies the stream for the mail merge engine to read an image from.
set_ImageStream(std::basic_istream<CharType, Traits>&)
set_ImageWidth(const System::SharedPtr<Aspose::Words::Fields::MergeFieldImageDimension>&)Setter for Aspose::Words::MailMerging::ImageFieldMergingArgs::get_ImageWidth.
set_Shape(const System::SharedPtr<Aspose::Words::Drawing::Shape>&)Setter for Aspose::Words::MailMerging::ImageFieldMergingArgs::get_Shape.
static Type()

Remarks

This event occurs during mail merge when an image mail merge field is encountered in the document. You can respond to this event to return a file name, stream, or an Image object to the mail merge engine so it is inserted into the document.

There are three properties available ImageFileName, ImageStream and Image to specify where the image must be taken from. Set only one of these properties.

To insert an image mail merge field into a document in Word, select Insert/Field command, then select MergeField and type Image:MyFieldName.

See Also