Open XML Appending Documents



  • I'm working on a project at the moment where i have to append a bunch of docx files together into one big file(in c# FYI).  Unfortunately the sdk doesn't have a nice append method for appending two docx docs.  My googling has not revealed any answers and no nice bits of code on sourceforge to do it.  I feel confident enough in my knowledge of the docx format to write and append method myself but it just seems like one of those things that must have been done already.  Plus i'm on a fixed price for this job and really wasn't anticipating needing to write my own code for this and it will be a fiddly bit of code to write.

    Has anyone here seen a solution to or written a solution for this problem? 



  • @element[0] said:

    Has anyone here seen a solution to or written a solution for this problem? 
     

    If you're dealing with docx, then you're undoubtedly on a Windoze platform. Just install Office '07 and use office automation to tell Word to open both files and append one to the other.

    Remember, Office ain't a wordprocessor, Office ain't a spreadsheet, Office ain't a slideshow creator. Office is a programming API that happens to ship with implementations of all the above. 


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.