How to duplicate .doc page
I have a microsoft word document with single page. I need to make more pages is that document that is the sam开发者_运维百科e as first page.
If you add a reference to Microsoft Word, you can use Microsoft.Office.Interop.Word to edit and create word documents. The easiest way to copy pages is probably to create a new file and then insert the original file as many times as you need pages. using Microsoft.Office.Interop.Word;
object missing = System.Reflection.Missing.Value;
object StartPoint = 0;
ApplicationClass WordApp = new ApplicationClass();
Document WordDoc = WordApp.Documents.Add(ref missing, ref missing,
ref missing, ref missing);
Range MyRange = WordDoc.Range(ref StartPoint, ref missing);
Then use InsertFile with your original file as many times as you need pages.
精彩评论