OpenXML Merging Documents - How to See Content using Productivity Tool -


i'm new , struggling openxml. have word template , depending on number of records user selects in website have, pull records out of database , use template create word document. assemble these documents 1 master word document served user. use openxml , altchunks this:

string altchunkid = "altchunkid" + itemno.tostring(); maindocumentpart mainpart = mydoc.maindocumentpart; alternativeformatimportpart chunk = mainpart.addalternativeformatimportpart(                                     alternativeformatimportparttype.wordprocessingml, altchunkid); using (filestream filestream = file.open(createdfilename, filemode.open)) {   chunk.feeddata(filestream);   filestream.close(); } altchunk altchunk = new altchunk(); altchunkproperties altchunkproperties = new altchunkproperties(); matchsource matchsrc = new matchsource(); matchsrc.val = true; altchunkproperties.append(matchsrc); altchunk.appendchild(altchunkproperties); altchunk.id = altchunkid; mainpart.document.body.append(altchunk); mainpart.document.save(); 

when open 1 of template documents in productivity tool can see elements i'd expect:

enter image description here

however, when @ 'master' document, can down matchsource:

enter image description here

what don't understand why can't see paragraph tags etc in master document that's produced. can me understand how see information? there wrong document structure?

that's because of way altchuncks merged master document. altchuncks won't change master document's openxml markup adds file as embedded resources. think of if attaching email not adding actual email body text. there third party solutions document builder merge document modifying master documents markup. can see expecting in productivity tool.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -