Free Support Forum -

MailMerge Execute overload suggestion

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


<?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:

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;