In-Paragraph List in Email Document
Leave feedback
NoteIn this article, we will use GroupDocs.Assembly to generate a In-Paragraph List report in Email Document format.
NoteThis feature is supported by version 17.8.0 or greater
As a report developer, you are required to share the following key requirements:
- Report must be in .eml or .msg format.
- It must add email recipient, css and subject of the email.
- A descriptive or informative line like “We provide support for the following products:”.
- Show all the products along with the above sentence.
We provide support for the following products:
<<foreach [in products]>><<[IndexOf() != 0 ? ", " : ""]>>
<<[ProductName]>>
<</foreach>>
TipFor detailed technical information about syntax,expressions and report generation by the engine, please visit: Working with GroupDocs.Assembly Engine.
Please download the sample Common List document we created in this article:
NoteThe code uses some of the objects defined in: The Business Layer.
//For complete examples and data files, please go to https://github.com/groupdocs-assembly/GroupDocs.Assembly-for-.NET | |
//Setting up source email document template | |
const String strEmailDocumentTemplate = "Email Templates/In-Paragraph List.msg"; | |
//Setting up destination email document report | |
const String strEmailDocumentReport = "Email Reports/In-Paragraph List Report.msg"; | |
try | |
{ | |
//Instantiate DocumentAssembler class | |
DocumentAssembler assembler = new DocumentAssembler(); | |
//Call AssembleDocument to generate In-Paragraph List Report in email document format | |
assembler.AssembleDocument(CommonUtilities.GetSourceDocument(strEmailDocumentTemplate), CommonUtilities.SetDestinationDocument(strEmailDocumentReport),DataLayer.EmailDataSourceObject(strEmailDocumentTemplate, DataLayer.GetProductsData()), DataLayer.EmailDataSourceName(".msg", "products")); | |
} | |
catch (Exception ex) | |
{ | |
Console.WriteLine(ex.Message); | |
} |
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.