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.

Wed Jun 20, 2012 4:00 am

First off, this is a really great tool and I think it's exactly what I've been looking for. I have two items remaining to figure out - I think I'm close on one of them but here is my second issue.

Is there a way to copy a page of a word template and then target that page to change contents. Here is what I'm basically trying to do. Let's say page 5 consists of a table and page 6 is a graph of information. I want to iterate through a set of table (let's say 6 items) where I would copy page 5 and 6, the five times (to get to 6 copies of it) and then customize that content on each page.

Hopefully that makes sense. Any suggestions would be great. I'll keep playing with it.

Thanks,

Richard

rbrynteson
 
Posts: 11
Joined: Wed Jun 20, 2012 3:58 am

Wed Jun 20, 2012 6:12 am

Hi Richard,

As the issue you reported, we have created a research on it, but we need some more time to fix it. You will be surely informed once we fix it.
Have a nice day!

----------------------------------------------------------------------------------------------------
Nancy
e-iceblue support
Nancy
e-iceblue support team
contact: nancy.wang@e-iceblue.com
User avatar

nancy
 
Posts: 51
Joined: Wed May 30, 2012 2:02 am

Sat Jun 23, 2012 3:31 am

That was too easy. Found the following:

Section copySection = document.Sections[4];
document.Sections.Add(copySection.Clone());

Where Sections[4] was the fifth page and the one I wanted to copy.

[edit]
So the follow up to this is after I've copied a page, I wanted to edit the content on simply one of those pages. I did this through using something like this:

ISection pg1 = document.Sections[4];
IParagraph p0 = pg1.Paragraphs[0];
p0.Replace("<<Measure>>", qryReport.Rows[i]["expr2"].ToString(), true, true);

Hope it helps someone else.

DJ

rbrynteson
 
Posts: 11
Joined: Wed Jun 20, 2012 3:58 am

Wed Jun 27, 2012 8:26 am

Hi rbrynteson,

Thank you for sharing codes. :)
----------------------------------------------------
Nancy
e-iceblue.com
Nancy
e-iceblue support team
contact: nancy.wang@e-iceblue.com
User avatar

nancy
 
Posts: 51
Joined: Wed May 30, 2012 2:02 am

Return to Spire.Doc