Free Support Forum - aspose.com

MailMerge Execute overload suggestion

document.MailMerge.Execute(IEnumerable<KeyValuePair<string, object>> datasource);

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your suggestion. But, I think it is not necessary to add one more overload. If you need to fill your document from set of KeyValuePair objects, you can easily achieve this using IMailMergeDatasource. Please see the following link for more information:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net-and-java/aspose.words.reporting.imailmergedatasource.html

Hope this helps.

Best regards.

Yup, your probably right.
It's just one of the small extensions methods I have created that I use a lot.
This one I also use a lot by the way:

///


/// Gets the style associated with the specified name the active document.
///

/// The builder.
/// The name whose style to get.
/// When this method returns, the style associated with the specified name, if the name is found; otherwise null. This parameter is passed uninitialized.
/// True if a style with the specified name is found; otherwise false.
public static bool TryGetStyle(this DocumentBuilder builder, string name, out Aspose.Words.Style style)
{
style = builder.Document.Styles[name];
return style != null;
}