Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Sun May 14, 2017 2:39 pm

Hi,

I'm Newbies using Spire.Doc for .NET. Still under evaluation

I want to Combine 2 Document into Single Document. My files as follow,

1- Nota_3_Universiti.doc ( 9 Pages )

2- Nota_4_Universiti.doc ( 1 Page )

*See attachment - docs.zip

After Merged using below code
Code: Select all
//Load Document1 and Document2
            Document DocOne = new Document();           
            DocOne.LoadFromFile(@"C:\myDevelopment\SPKU_Dev - 28.03.2016 - 1\trnxFolder\Nota_3_Universiti.doc", FileFormat.Doc);

            Document DocTwo = new Document();
            DocTwo.LoadFromFile(@"C:\myDevelopment\SPKU_Dev - 28.03.2016 - 1\trnxFolder\Nota_4_Universiti.doc", FileFormat.Doc);

            //Merge
            foreach (Spire.Doc.Section sec in DocTwo.Sections)
            {
                DocOne.Sections.Add(sec.Clone());
            }

            //Save
            DocOne.SaveToFile(Server.MapPath("trnxFolder//Merge.doc"), FileFormat.Doc);


My Output Document as followed. Why only 2 Pages? Looks like Nota_3_Universiti.doc ( 9 Pages ) only appear in 1 Page

Image

Please help

wkm1925
 
Posts: 2
Joined: Sun May 14, 2017 8:14 am

Mon May 15, 2017 3:00 am

Dear wkm1925,

Thanks for your inquiry.
I have reproduced the issue and posted it to our Dev team. We will inform you as soon as there is any great progress.
Sorry for inconvenience caused.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Mon May 15, 2017 12:08 pm

Thanks Betsy. I'm waiting

wkm1925
 
Posts: 2
Joined: Sun May 14, 2017 8:14 am

Return to Spire.Doc