diff --git a/Fields/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/.NET/Display-Multiple-Paragraph-Based-On-Merge-Field-Value.sln b/Fields/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/.NET/Display-Multiple-Paragraph-Based-On-Merge-Field-Value.sln new file mode 100644 index 00000000..038f9aea --- /dev/null +++ b/Fields/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/.NET/Display-Multiple-Paragraph-Based-On-Merge-Field-Value.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.37614.0 d17.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Display-Multiple-Paragraph-Based-On-Merge-Field-Value", "Display-Multiple-Paragraph-Based-On-Merge-Field-Value\Display-Multiple-Paragraph-Based-On-Merge-Field-Value.csproj", "{781D1C7A-3B22-430C-D7D7-61F5D51117BA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {781D1C7A-3B22-430C-D7D7-61F5D51117BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {781D1C7A-3B22-430C-D7D7-61F5D51117BA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {781D1C7A-3B22-430C-D7D7-61F5D51117BA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {781D1C7A-3B22-430C-D7D7-61F5D51117BA}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8775710B-560C-4845-8EB2-77B493F52239} + EndGlobalSection +EndGlobal diff --git a/Fields/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/.NET/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/Data/Template.docx b/Fields/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/.NET/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/Data/Template.docx new file mode 100644 index 00000000..0f6a26c8 Binary files /dev/null and b/Fields/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/.NET/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/Data/Template.docx differ diff --git a/Fields/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/.NET/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/Display-Multiple-Paragraph-Based-On-Merge-Field-Value.csproj b/Fields/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/.NET/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/Display-Multiple-Paragraph-Based-On-Merge-Field-Value.csproj new file mode 100644 index 00000000..7f3ee75d --- /dev/null +++ b/Fields/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/.NET/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/Display-Multiple-Paragraph-Based-On-Merge-Field-Value.csproj @@ -0,0 +1,24 @@ + + + + Exe + net8.0 + Display_Multiple_Paragraph_Based_On_Merge_Field_Value + + + + + Always + + + Always + + + + + + + + + + diff --git a/Fields/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/.NET/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/Output/.gitkeep b/Fields/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/.NET/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/Output/.gitkeep new file mode 100644 index 00000000..5f282702 --- /dev/null +++ b/Fields/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/.NET/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/Output/.gitkeep @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Fields/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/.NET/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/Output/Output.docx b/Fields/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/.NET/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/Output/Output.docx new file mode 100644 index 00000000..164d32fd Binary files /dev/null and b/Fields/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/.NET/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/Output/Output.docx differ diff --git a/Fields/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/.NET/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/Program.cs b/Fields/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/.NET/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/Program.cs new file mode 100644 index 00000000..e276d145 --- /dev/null +++ b/Fields/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/.NET/Display-Multiple-Paragraph-Based-On-Merge-Field-Value/Program.cs @@ -0,0 +1,31 @@ +using Syncfusion.DocIO; +using Syncfusion.DocIO.DLS; +using System.IO; + +namespace Display_Multiple_Paragraph_Based_On_Merge_Field_Value +{ + class Program + { + static void Main(string[] args) + { + // Open the Word template document. + using (WordDocument document = new WordDocument(Path.GetFullPath(@"Data/Template.docx"))) + { + // Define merge field names available in the template. + string[] fieldNames = new string[] { "VariableField1", "VariableField2" }; + + // Define values to be merged into the corresponding fields. + string[] fieldValues = new string[] { "1", "2" }; + + // Perform mail merge using the specified field names and values. + document.MailMerge.Execute(fieldNames, fieldValues); + + // Update all document fields after mail merge. + document.UpdateDocumentFields(); + + // Save the generated document as a DOCX file. + document.Save(Path.GetFullPath(@"Output/Output.docx"), FormatType.Docx); + } + } + } +}