Well, thats very complex how i'm generating/injecting the Custom XML into docx, but in most simple words: well, I generate all needed files/folders on my own programatically (customXML/item1-3.xml;itemProps1-3.xml;/_rels/item1-3.xml.rels) when i set up the connection for the dataset it's guid is set to my special guid; then i add my columns and rows needed (most likely stuff like: firstname, surname, ...) this happens when the word-file is opened out of our program and hasn't yet any custom xml.
then i got 2 COM Add-Ins - 1 has just a DocumenentOpenEventHandler and activates the second, which should insert Content Controls, but i need to check, if the file has my CustomXML which is needed for the Content Controls of course ... so i call: Office.CustomXMLPart customXML = _Doc.CustomXMLParts.SelectByID(MYGUID); and here is where i get my NULL value ... maybe i could send you a docx-file with my CustomXML injected, so you could try a bit with it ...
but I'm NOT using the new windows SDK - and i MUST NOT use it ...
thx for your quick answer |