Hi, I am merging documents using altchunk sections in OpenXML but for some reason page properties such as margins / printer tray info does not get picked up by word when i open the document.For example, let's say I am merging 2 documents, each with it's own margins. The document.xml file in my main document should look something like this:<?xml version="1.0" encoding="utf-8"?><w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"> <w:body> <w:altChunk r:id="AltChunkId1" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" /> <w:altChunk r:id="AltChunkId2" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" /> </w:body></w:document>but when i open the document in Word, it is picking up the margin properties from the main document (i.e. there aren't any) rather than looking in the altchunk docs and reading them from there for each chunk. To work around it I have to extract the section properties from each sub-document and put them in the main doc, so it looks like this:<?xml version="1.0" encoding="utf-8"?><w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"> <w:body> <w:altChunk r:id="AltChunkId1" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" /> <w:p> <w:pPr> <w:sectPr w:rsidRPr="00A805D3" w:rsidR="00A805D3" w:rsidSect="00FB334D"> <w:pgSz w:w="11906" w:h="16838" w:code="9" /> <w:pgMar w:top="720" w:right="720" w:bottom="720" w:left="720" w:header="709" w:footer="709" w:gutter="0" /> <w:paperSrc w:first="259" w:other="259" /> <w:cols w:space="708" /> <w:docGrid w:linePitch="360" /> </w:sectPr> </w:pPr> </w:p> <w:altChunk r:id="AltChunkId2" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" /> <w:sectPr w:rsidRPr="00C23C3C" w:rsidR="00CC3355"> <w:pgSz w:w="11906" w:h="16838" /> <w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440" w:header="708" w:footer="708" w:gutter="0" /> <w:cols w:space="708" /> <w:docGrid w:linePitch="360" /> </w:sectPr> </w:body></w:document>Which then applies the margins from each sub-document correctly. However this only works if the margins are consistent within each sub-document. if a sub-document has it's own section preoperties within itself (i.e. within a paragraph) then these don't get picked up. How can I get Word to recognise the section properties within each alt chunk?Thanks very much for any helpDave
I thought about using Document Builder instead of altChunks, however I can't as some of my docs that i am using may themselves contain altChunks and Document Builder does not support this so I really am stuck using altChunk. Does anyone know a way to get Word to recognise section properties within the altChunks?
Thanks
Dave