Click here to Skip to main content
Licence 
First Posted 12 May 2005
Views 25,700
Bookmarked 20 times

Append Word documents using interop services

By | 12 May 2005 | Article
An article on Word append using interop.
 
Part of The SQL Zone sponsored by
See Also

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.

 

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

 

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

About the Author

Rabeek

Web Developer

India India

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionWhat? How? Why? PinmemberPoolbeer7:49 12 May '05  
AnswerRe: What? How? Why? Pinmembermaint0r21:47 27 Jul '06  

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

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

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 12 May 2005
Article Copyright 2005 by Rabeek
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid