开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜