Free Support Forum - aspose.com

How do I Do this?

I have, say (small) 4 document Templates, with each template content is less than a word document (normal) page size.

In my code, i want to combine (any 2 of these) documents and create one document and one page.

IF I use, Sections.Add, Aspose.Word creates two pages ?

I created a Master Template Document, with Two Merge Fields (in 2 Rows), say Doc1_Filed and Doc2_Field.

All I need is read the template1 and insert into Merge Field1 and read template 2 and insert into Merge Field2.

Is this Possible ?

Thanks,
Gopi

Hi Gopi,

Thank you for interest in Aspose products.

Try to use Section.AppendContent instead of Sections.Add.

I’m using version 2.3.3.0

while (srcDoc.Sections.Count > 0)
{
Aspose.Word.Section section = srcDoc.Sections[0];
srcDoc.Sections.RemoveAt(0);
dstDoc.Sections.Add(section);
}


but i can’t seem to find “Section.AppendContent” ?? in this version (2.3.3.0)

Am I missing something ?

Gopi

oops, after clicking post (!) I found out that it is
Sections[0].AppendContent …

Thanks,

Gopi

Another way to do this is:

Sections[1].PageSetup.SectionStart = SectionStart.Continuous;

This will cause the second section to start on the same page as the previous section ended.

Thanks for all you Guys excellent Help, and quick respose.
keep it up …

Gopi