Click here to Skip to main content
15,886,518 members
Articles / Web Development / HTML
Article

Append Word documents using interop services

Rate me:
Please Sign up or sign in to vote.
1.17/5 (9 votes)
12 May 2005 38.8K   711   20   2
An article on Word append using interop.

Introduction

This source code is helpful to append set of documents and generate a single document.

Background (optional)

I have assigned a project in my company to generate a proposal that contains different sections. Each section will be presented in a separate word document. I have implemented this project using word interop services in .NET.

 <o:p>

Using the code

The implementation is very simple. A line code has been used to append a set of documents. The code is,

oWord.Selection.InsertFile(strFile2,ref oObject,ref oObject,ref oObject,ref oObject)

To run this application you should have below references,

Microsoft Office 9.0 Object Library

Microsoft Word 9.0 Object Library

 <o:p>

GenerateDocument Method

This method is designed to generate the appended document. In this, system gets the file names from the xml file And append the files one by one and present the final file. Page break has been implemented between each file that is inserted. The example project has been given in zip format.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
QuestionWhat? How? Why? Pin
Poolbeer12-May-05 7:49
Poolbeer12-May-05 7:49 
AnswerRe: What? How? Why? Pin
maint0r27-Jul-06 21:47
maint0r27-Jul-06 21:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.