Sign In  Sign Up Live-Chat

Required Guidance to Merge a Word Document for Different Regions

Last post 05-05-2008, 4:21 AM by alexey.noskov. 1 replies.
Sort Posts: Previous Next
  •  05-05-2008, 2:40 AM 125344

    Required Guidance to Merge a Word Document for Different Regions

    Attachment: Present (inaccessible)

    Dear Sir,

    This is Amit Dangre. I need a guidance on merging a region in a word document , so rows in the region will be created dynamically. I read the article on mail merge with region explained but when i try to merge a field in the document with different view it gives me error since that view doesnt contain fields to be merged in other section of the documents. Kindly find the attached document where i have to merge a section (Qualification Details dynamically)

    So kindly revert asap on how to merge document using different views simultaneously.


    This message was posted using Page2Forum (attachment) from Mail Merge with Regions Explained - Aspose.Words for .NET and Java
     
  •  05-05-2008, 4:21 AM 125368 in reply to 125344

    Re: Required Guidance to Merge a Word Document for Different Regions

    Attachment: Present (inaccessible)

    Hi

     

    Thanks for your request. Could you please attach your template document for testing? Also please read the following article to learn how to prepare template document.

    http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/preparing-a-document.html

     

    Also please see the following code and attached documents.

    //Create DataTable

    DataTable info = new DataTable("Info");

    //Add columns

    info.Columns.Add("FirstName");

    info.Columns.Add("LastName");

    info.Columns.Add("Company");

    //Add rows

    info.Rows.Add(new object[] { "Alexey", "Noskov", "Aspose" });

    info.Rows.Add(new object[] { "Den", "Michel", "Nicon" });

     

    //Open template document

    Document doc = new Document(@"Test153\in.doc");

    //Execute maeil merge

    doc.MailMerge.ExecuteWithRegions(info);

    //Save output document

    doc.Save(@"Test153\out.doc");

     

    Best regards.


    Alexey Noskov
    Developer/Technical Support
    Aspose Auckland Team
     
View as RSS news feed in XML