Merge Word Documents (Office Interop & .NET), Keeping Formatting

后端 未结 1 445
天命终不由人
天命终不由人 2021-01-21 01:20

I\'m having some difficulty merging multiple word documents together using Microsoft Office Interop Assemblies (Office 2007) and ASP.NET 3.5. I\'m able to merge the documents, b

1条回答
  •  清歌不尽
    2021-01-21 02:00

    While adding the documents you are skipping the Template name, that why ut's missing the format.

    It should look like

    string defaultTemplate="your template name with full path"; 
    

    OR

    Default template name

    string defaultTemplate="Normal.dot";
    
    wordApplication.Documents.Add(ref defaultTemplate,............
    

    Use this link as Ref: http://devpinoy.org/blogs/keithrull/archive/2007/05/23/how-to-merge-multiple-microsoft-word-documents-in-c.aspx

    0 讨论(0)
提交回复
热议问题