I have this code to insert a chart inside a content control in a MS Word document using Office Js.
Word.run(function (context) {
var mySelection = context.document.getSelection();
var contentCtrl = mySelection.insertContentControl();
contentCtrl.insertOoxml(Ooxml, "start");
return context.sync().then(function () {
console.log("Success!");
}).catch(errorHandler);
}).catch(errorHandler);
And it is working well with a standard chart. For example a Clustered Column Chart with the following Ooxml:
<?mso-application progid="Word.Document"?>
<pkg:package xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage">
<pkg:part pkg:name="/word/charts/chart1.xml" pkg:contentType="application/vnd.openxmlformats-officedocument.drawingml.chart+xml">
<pkg:xmlData>
<c:chartSpace xmlns:c="http://schemas.openxmlformats.org/drawingml/2006/chart" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:c16r2="http://schemas.microsoft.com/office/drawing/2015/06/chart">
<c:date1904 val="0"/>
<c:lang val="en-US"/>
<c:roundedCorners val="0"/>
<mc:AlternateContent xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">
<mc:Choice Requires="c14" xmlns:c14="http://schemas.microsoft.com/office/drawing/2007/8/2/chart">
<c14:style val="102"/>
</mc:Choice>
<mc:Fallback>
<c:style val="2"/>
</mc:Fallback>
</mc:AlternateContent>
<c:chart>
<c:title>
<c:overlay val="0"/>
<c:spPr>
<a:noFill/>
<a:ln>
<a:noFill/>
</a:ln>
<a:effectLst/>
</c:spPr>
<c:txPr>
<a:bodyPr rot="0" spcFirstLastPara="1" vertOverflow="ellipsis" vert="horz" wrap="square" anchor="ctr" anchorCtr="1"/>
<a:lstStyle/>
<a:p>
<a:pPr>
<a:defRPr sz="1400" b="0" i="0" u="none" strike="noStrike" kern="1200" spc="0" baseline="0">
<a:solidFill>
<a:schemeClr val="tx1">
<a:lumMod val="65000"/>
<a:lumOff val="35000"/>
</a:schemeClr>
</a:solidFill>
<a:latin typeface="+mn-lt"/>
<a:ea typeface="+mn-ea"/>
<a:cs typeface="+mn-cs"/>
</a:defRPr>
</a:pPr>
<a:endParaRPr lang="it-IT"/>
</a:p>
</c:txPr>
</c:title>
<c:autoTitleDeleted val="0"/>
<c:plotArea>
<c:layout/>
<c:barChart>
<c:barDir val="col"/>
<c:grouping val="clustered"/>
<c:varyColors val="0"/>
<c:ser>
<c:idx val="0"/>
<c:order val="0"/>
<c:tx>
<c:strRef>
<c:f>Sheet1!$B$1</c:f>
<c:strCache>
<c:ptCount val="1"/>
<c:pt idx="0">
<c:v>Series 1</c:v>
</c:pt>
</c:strCache>
</c:strRef>
</c:tx>
<c:spPr>
<a:solidFill>
<a:schemeClr val="accent1"/>
</a:solidFill>
<a:ln>
<a:noFill/>
</a:ln>
<a:effectLst/>
</c:spPr>
<c:invertIfNegative val="0"/>
<c:cat>
<c:strRef>
<c:f>Sheet1!$A$2:$A$5</c:f>
<c:strCache>
<c:ptCount val="4"/>
<c:pt idx="0">
<c:v>Category 1</c:v>
</c:pt>
<c:pt idx="1">
<c:v>Category 2</c:v>
</c:pt>
<c:pt idx="2">
<c:v>Category 3</c:v>
</c:pt>
<c:pt idx="3">
<c:v>Category 4</c:v>
</c:pt>
</c:strCache>
</c:strRef>
</c:cat>
<c:val>
<c:numRef>
<c:f>Sheet1!$B$2:$B$5</c:f>
<c:numCache>
<c:formatCode>General</c:formatCode>
<c:ptCount val="4"/>
<c:pt idx="0">
<c:v>4.3</c:v>
</c:pt>
<c:pt idx="1">
<c:v>2.5</c:v>
</c:pt>
<c:pt idx="2">
<c:v>3.5</c:v>
</c:pt>
<c:pt idx="3">
<c:v>4.5</c:v>
</c:pt>
</c:numCache>
</c:numRef>
</c:val>
<c:extLst>
<c:ext uri="{C3380CC4-5D6E-409C-BE32-E72D297353CC}" xmlns:c16="http://schemas.microsoft.com/office/drawing/2014/chart">
<c16:uniqueId val="{00000000-8503-47A1-94D3-B89DD2A1A99D}"/>
</c:ext>
</c:extLst>
</c:ser>
<c:ser>
<c:idx val="1"/>
<c:order val="1"/>
<c:tx>
<c:strRef>
<c:f>Sheet1!$C$1</c:f>
<c:strCache>
<c:ptCount val="1"/>
<c:pt idx="0">
<c:v>Series 2</c:v>
</c:pt>
</c:strCache>
</c:strRef>
</c:tx>
<c:spPr>
<a:solidFill>
<a:schemeClr val="accent2"/>
</a:solidFill>
<a:ln>
<a:noFill/>
</a:ln>
<a:effectLst/>
</c:spPr>
<c:invertIfNegative val="0"/>
<c:cat>
<c:strRef>
<c:f>Sheet1!$A$2:$A$5</c:f>
<c:strCache>
<c:ptCount val="4"/>
<c:pt idx="0">
<c:v>Category 1</c:v>
</c:pt>
<c:pt idx="1">
<c:v>Category 2</c:v>
</c:pt>
<c:pt idx="2">
<c:v>Category 3</c:v>
</c:pt>
<c:pt idx="3">
<c:v>Category 4</c:v>
</c:pt>
</c:strCache>
</c:strRef>
</c:cat>
<c:val>
<c:numRef>
<c:f>Sheet1!$C$2:$C$5</c:f>
<c:numCache>
<c:formatCode>General</c:formatCode>
<c:ptCount val="4"/>
<c:pt idx="0">
<c:v>2.4</c:v>
</c:pt>
<c:pt idx="1">
<c:v>4.4000000000000004</c:v>
</c:pt>
<c:pt idx="2">
<c:v>1.8</c:v>
</c:pt>
<c:pt idx="3">
<c:v>2.8</c:v>
</c:pt>
</c:numCache>
</c:numRef>
</c:val>
<c:extLst>
<c:ext uri="{C3380CC4-5D6E-409C-BE32-E72D297353CC}" xmlns:c16="http://schemas.microsoft.com/office/drawing/2014/chart">
<c16:uniqueId val="{00000001-8503-47A1-94D3-B89DD2A1A99D}"/>
</c:ext>
</c:extLst>
</c:ser>
<c:ser>
<c:idx val="2"/>
<c:order val="2"/>
<c:tx>
<c:strRef>
<c:f>Sheet1!$D$1</c:f>
<c:strCache>
<c:ptCount val="1"/>
<c:pt idx="0">
<c:v>Series 3</c:v>
</c:pt>
</c:strCache>
</c:strRef>
</c:tx>
<c:spPr>
<a:solidFill>
<a:schemeClr val="accent3"/>
</a:solidFill>
<a:ln>
<a:noFill/>
</a:ln>
<a:effectLst/>
</c:spPr>
<c:invertIfNegative val="0"/>
<c:cat>
<c:strRef>
<c:f>Sheet1!$A$2:$A$5</c:f>
<c:strCache>
<c:ptCount val="4"/>
<c:pt idx="0">
<c:v>Category 1</c:v>
</c:pt>
<c:pt idx="1">
<c:v>Category 2</c:v>
</c:pt>
<c:pt idx="2">
<c:v>Category 3</c:v>
</c:pt>
<c:pt idx="3">
<c:v>Category 4</c:v>
</c:pt>
</c:strCache>
</c:strRef>
</c:cat>
<c:val>
<c:numRef>
<c:f>Sheet1!$D$2:$D$5</c:f>
<c:numCache>
<c:formatCode>General</c:formatCode>
<c:ptCount val="4"/>
<c:pt idx="0">
<c:v>2</c:v>
</c:pt>
<c:pt idx="1">
<c:v>2</c:v>
</c:pt>
<c:pt idx="2">
<c:v>3</c:v>
</c:pt>
<c:pt idx="3">
<c:v>5</c:v>
</c:pt>
</c:numCache>
</c:numRef>
</c:val>
<c:extLst>
<c:ext uri="{C3380CC4-5D6E-409C-BE32-E72D297353CC}" xmlns:c16="http://schemas.microsoft.com/office/drawing/2014/chart">
<c16:uniqueId val="{00000002-8503-47A1-94D3-B89DD2A1A99D}"/>
</c:ext>
</c:extLst>
</c:ser>
<c:dLbls>
<c:showLegendKey val="0"/>
<c:showVal val="0"/>
<c:showCatName val="0"/>
<c:showSerName val="0"/>
<c:showPercent val="0"/>
<c:showBubbleSize val="0"/>
</c:dLbls>
<c:gapWidth val="219"/>
<c:overlap val="-27"/>
<c:axId val="552556360"/>
<c:axId val="552565544"/>
</c:barChart>
<c:catAx>
<c:axId val="552556360"/>
<c:scaling>
<c:orientation val="minMax"/>
</c:scaling>
<c:delete val="0"/>
<c:axPos val="b"/>
<c:numFmt formatCode="General" sourceLinked="1"/>
<c:majorTickMark val="none"/>
<c:minorTickMark val="none"/>
<c:tickLblPos val="nextTo"/>
<c:spPr>
<a:noFill/>
<a:ln w="9525" cap="flat" cmpd="sng" algn="ctr">
<a:solidFill>
<a:schemeClr val="tx1">
<a:lumMod val="15000"/>
<a:lumOff val="85000"/>
</a:schemeClr>
</a:solidFill>
<a:round/>
</a:ln>
<a:effectLst/>
</c:spPr>
<c:txPr>
<a:bodyPr rot="-60000000" spcFirstLastPara="1" vertOverflow="ellipsis" vert="horz" wrap="square" anchor="ctr" anchorCtr="1"/>
<a:lstStyle/>
<a:p>
<a:pPr>
<a:defRPr sz="900" b="0" i="0" u="none" strike="noStrike" kern="1200" baseline="0">
<a:solidFill>
<a:schemeClr val="tx1">
<a:lumMod val="65000"/>
<a:lumOff val="35000"/>
</a:schemeClr>
</a:solidFill>
<a:latin typeface="+mn-lt"/>
<a:ea typeface="+mn-ea"/>
<a:cs typeface="+mn-cs"/>
</a:defRPr>
</a:pPr>
<a:endParaRPr lang="it-IT"/>
</a:p>
</c:txPr>
<c:crossAx val="552565544"/>
<c:crosses val="autoZero"/>
<c:auto val="1"/>
<c:lblAlgn val="ctr"/>
<c:lblOffset val="100"/>
<c:noMultiLvlLbl val="0"/>
</c:catAx>
<c:valAx>
<c:axId val="552565544"/>
<c:scaling>
<c:orientation val="minMax"/>
</c:scaling>
<c:delete val="0"/>
<c:axPos val="l"/>
<c:majorGridlines>
<c:spPr>
<a:ln w="9525" cap="flat" cmpd="sng" algn="ctr">
<a:solidFill>
<a:schemeClr val="tx1">
<a:lumMod val="15000"/>
<a:lumOff val="85000"/>
</a:schemeClr>
</a:solidFill>
<a:round/>
</a:ln>
<a:effectLst/>
</c:spPr>
</c:majorGridlines>
<c:numFmt formatCode="General" sourceLinked="1"/>
<c:majorTickMark val="none"/>
<c:minorTickMark val="none"/>
<c:tickLblPos val="nextTo"/>
<c:spPr>
<a:noFill/>
<a:ln>
<a:noFill/>
</a:ln>
<a:effectLst/>
</c:spPr>
<c:txPr>
<a:bodyPr rot="-60000000" spcFirstLastPara="1" vertOverflow="ellipsis" vert="horz" wrap="square" anchor="ctr" anchorCtr="1"/>
<a:lstStyle/>
<a:p>
<a:pPr>
<a:defRPr sz="900" b="0" i="0" u="none" strike="noStrike" kern="1200" baseline="0">
<a:solidFill>
<a:schemeClr val="tx1">
<a:lumMod val="65000"/>
<a:lumOff val="35000"/>
</a:schemeClr>
</a:solidFill>
<a:latin typeface="+mn-lt"/>
<a:ea typeface="+mn-ea"/>
<a:cs typeface="+mn-cs"/>
</a:defRPr>
</a:pPr>
<a:endParaRPr lang="it-IT"/>
</a:p>
</c:txPr>
<c:crossAx val="552556360"/>
<c:crosses val="autoZero"/>
<c:crossBetween val="between"/>
</c:valAx>
<c:spPr>
<a:noFill/>
<a:ln>
<a:noFill/>
</a:ln>
<a:effectLst/>
</c:spPr>
</c:plotArea>
<c:legend>
<c:legendPos val="b"/>
<c:overlay val="0"/>
<c:spPr>
<a:noFill/>
<a:ln>
<a:noFill/>
</a:ln>
<a:effectLst/>
</c:spPr>
<c:txPr>
<a:bodyPr rot="0" spcFirstLastPara="1" vertOverflow="ellipsis" vert="horz" wrap="square" anchor="ctr" anchorCtr="1"/>
<a:lstStyle/>
<a:p>
<a:pPr>
<a:defRPr sz="900" b="0" i="0" u="none" strike="noStrike" kern="1200" baseline="0">
<a:solidFill>
<a:schemeClr val="tx1">
<a:lumMod val="65000"/>
<a:lumOff val="35000"/>
</a:schemeClr>
</a:solidFill>
<a:latin typeface="+mn-lt"/>
<a:ea typeface="+mn-ea"/>
<a:cs typeface="+mn-cs"/>
</a:defRPr>
</a:pPr>
<a:endParaRPr lang="it-IT"/>
</a:p>
</c:txPr>
</c:legend>
<c:plotVisOnly val="1"/>
<c:dispBlanksAs val="gap"/>
<c:showDLblsOverMax val="0"/>
</c:chart>
<c:spPr>
<a:solidFill>
<a:schemeClr val="bg1"/>
</a:solidFill>
<a:ln w="9525" cap="flat" cmpd="sng" algn="ctr">
<a:solidFill>
<a:schemeClr val="tx1">
<a:lumMod val="15000"/>
<a:lumOff val="85000"/>
</a:schemeClr>
</a:solidFill>
<a:round/>
</a:ln>
<a:effectLst/>
</c:spPr>
<c:txPr>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:pPr>
<a:defRPr/>
</a:pPr>
<a:endParaRPr lang="it-IT"/>
</a:p>
</c:txPr>
</c:chartSpace>
</pkg:xmlData>
</pkg:part>
<pkg:part pkg:name="/word/document.xml" pkg:contentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml">
<pkg:xmlData>
<w:document xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" >
<w:body>
<w:p w:rsidR="00C75AEB" w:rsidRDefault="000F3EFF">
<w:r>
<w:rPr>
<w:noProof/>
</w:rPr>
<w:drawing>
<wp:inline distT="0" distB="0" distL="0" distR="0" wp14:anchorId="4175D679" wp14:editId="60B1BB5E">
<wp:extent cx="5486400" cy="3200400"/>
<wp:effectExtent l="0" t="0" r="0" b="0"/>
<wp:docPr id="1" name="Chart 1"/>
<wp:cNvGraphicFramePr/>
<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">
<a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/chart">
<c:chart xmlns:c="http://schemas.openxmlformats.org/drawingml/2006/chart" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" r:id="rId111"/>
</a:graphicData>
</a:graphic>
</wp:inline>
</w:drawing>
</w:r>
</w:p>
</w:body>
</w:document>
</pkg:xmlData>
</pkg:part>
<pkg:part pkg:name="/word/_rels/document.xml.rels" pkg:contentType="application/vnd.openxmlformats-package.relationships+xml">
<pkg:xmlData>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart" Target="/word/charts/chart1.xml" Id="rId111" />
</Relationships>
</pkg:xmlData>
</pkg:part>
<pkg:part pkg:name="/_rels/.rels" pkg:contentType="application/vnd.openxmlformats-package.relationships+xml">
<pkg:xmlData>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="/word/document.xml" Id="R96cd65a3975c42c6" />
</Relationships>
</pkg:xmlData>
</pkg:part>
</pkg:package>
On the other hand, I am having a hard time to find out how to insert an extended chart like a Waterfall Chart. I tried to create a Waterfall chart in an empty MS Word document and analyze its Ooxml code and I noticed that this kind of charts use a different namespace (cx:chart instead of c:chart) and uses an Extended Part instead of a classic Chart Part (content type is application/vnd.ms-office.chartex+xml instead of application/vnd.openxmlformats-officedocument.drawingml.chart+xml). So, I tried to insert the following Ooxml:
<?mso-application progid="Word.Document"?>
<pkg:package xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage">
<pkg:part pkg:name="/word/document.xml" pkg:contentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml">
<pkg:xmlData>
<w:document xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" >
<w:body>
<w:p w:rsidR="00C75AEB" w:rsidRDefault="000F3EFF">
<w:r>
<mc:AlternateContent xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">
<mc:Choice Requires="cx1">
<w:drawing>
<wp:inline distT="0" distB="0" distL="0" distR="0" wp14:anchorId="43C8E861" wp14:editId="0D87AFE0">
<wp:extent cx="5486400" cy="3200400"/>
<wp:effectExtent l="0" t="0" r="0" b="0"/>
<wp:docPr id="1" name="Chart 1"/>
<wp:cNvGraphicFramePr/>
<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">
<a:graphicData uri="http://schemas.microsoft.com/office/drawing/2014/chartex">
<cx:chart xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" r:id="rId111"/>
</a:graphicData>
</a:graphic>
</wp:inline>
</w:drawing>
</mc:Choice>
<mc:Fallback>
<w:drawing>
<wp:inline distT="0" distB="0" distL="0" distR="0" wp14:anchorId="43C8E861" wp14:editId="0D87AFE0">
<wp:extent cx="5486400" cy="3200400"/>
<wp:effectExtent l="0" t="0" r="0" b="0"/>
<wp:docPr id="1" name="Chart 1"/>
<wp:cNvGraphicFramePr>
<a:graphicFrameLocks xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" noGrp="1" noDrilldown="1" noSelect="1" noChangeAspect="1" noMove="1" noResize="1"/>
</wp:cNvGraphicFramePr>
<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">
<a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture">
<pic:pic xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture">
<pic:nvPicPr>
<pic:cNvPr id="1" name="Chart 1"/>
<pic:cNvPicPr>
<a:picLocks noGrp="1" noRot="1" noChangeAspect="1" noMove="1" noResize="1" noEditPoints="1" noAdjustHandles="1" noChangeArrowheads="1" noChangeShapeType="1"/>
</pic:cNvPicPr>
</pic:nvPicPr>
<pic:blipFill>
<a:blip r:embed="rId5"/>
<a:stretch>
<a:fillRect/>
</a:stretch>
</pic:blipFill>
<pic:spPr>
<a:xfrm>
<a:off x="0" y="0"/>
<a:ext cx="5486400" cy="3200400"/>
</a:xfrm>
<a:prstGeom prst="rect">
<a:avLst/>
</a:prstGeom>
</pic:spPr>
</pic:pic>
</a:graphicData>
</a:graphic>
</wp:inline>
</w:drawing>
</mc:Fallback>
</mc:AlternateContent>
</w:r>
</w:p>
</w:body>
</w:document>
</pkg:xmlData>
</pkg:part>
<pkg:part pkg:name="/word/charts/chartEx1.xml" pkg:contentType="application/vnd.ms-office.chartex+xml">
<pkg:xmlData>
<cx:chartSpace xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex">
<cx:chartData>
<cx:data id="0">
<cx:strDim type="cat">
<cx:f>Sheet1!$A$2:$A$9</cx:f>
<cx:lvl ptCount="8">
<cx:pt idx="0">Category 1</cx:pt>
<cx:pt idx="1">Category 2</cx:pt>
<cx:pt idx="2">Category 3</cx:pt>
<cx:pt idx="3">Category 4</cx:pt>
<cx:pt idx="4">Category 5</cx:pt>
<cx:pt idx="5">Category 6</cx:pt>
<cx:pt idx="6">Category 7</cx:pt>
<cx:pt idx="7">Category 8</cx:pt>
</cx:lvl>
</cx:strDim>
<cx:numDim type="val">
<cx:f>Sheet1!$B$2:$B$9</cx:f>
<cx:lvl ptCount="8" formatCode="General">
<cx:pt idx="0">100</cx:pt>
<cx:pt idx="1">20</cx:pt>
<cx:pt idx="2">50</cx:pt>
<cx:pt idx="3">-40</cx:pt>
<cx:pt idx="4">130</cx:pt>
<cx:pt idx="5">-60</cx:pt>
<cx:pt idx="6">70</cx:pt>
<cx:pt idx="7">140</cx:pt>
</cx:lvl>
</cx:numDim>
</cx:data>
</cx:chartData>
<cx:chart>
<cx:title pos="t" align="ctr" overlay="0" />
<cx:plotArea>
<cx:plotAreaRegion>
<cx:series layoutId="waterfall" uniqueId="{8256AF32-3F39-4C50-900C-275ED2F52034}">
<cx:tx>
<cx:txData>
<cx:f>Sheet1!$B$1</cx:f>
<cx:v>Series1</cx:v>
</cx:txData>
</cx:tx>
<cx:dataLabels pos="outEnd">
<cx:visibility seriesName="0" categoryName="0" value="1" />
</cx:dataLabels>
<cx:dataId val="0" />
<cx:layoutPr>
<cx:subtotals>
<cx:idx val="0" />
<cx:idx val="4" />
<cx:idx val="7" />
</cx:subtotals>
</cx:layoutPr>
</cx:series>
</cx:plotAreaRegion>
<cx:axis id="0">
<cx:catScaling gapWidth="0.5" />
<cx:tickLabels />
</cx:axis>
<cx:axis id="1">
<cx:valScaling />
<cx:majorGridlines />
<cx:tickLabels />
</cx:axis>
</cx:plotArea>
<cx:legend pos="t" align="ctr" overlay="0" />
</cx:chart>
</cx:chartSpace>
</pkg:xmlData>
</pkg:part>
<pkg:part pkg:name="/word/_rels/document.xml.rels" pkg:contentType="application/vnd.openxmlformats-package.relationships+xml">
<pkg:xmlData>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Type="http://schemas.microsoft.com/office/2014/relationships/chartEx" Target="/word/charts/chartEx1.xml" Id="rId111" />
</Relationships>
</pkg:xmlData>
</pkg:part>
<pkg:part pkg:name="/_rels/.rels" pkg:contentType="application/vnd.openxmlformats-package.relationships+xml">
<pkg:xmlData>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="/word/document.xml" Id="R96cd65a3975c42c6" />
</Relationships>
</pkg:xmlData>
</pkg:part>
</pkg:package>
But the insertOoxml method is throwing a GeneralException.
What am I missing?
How can I insert a Waterfall Chart by inserting its Ooxml?
Can you try this Waterfall ooxml got this from one of MSDN forum, you can take refrence from this OOXML.
Related
I am reading openxml package file and at one place I am not able to figure out the source of text color
If you look into the below xml there are run elements which contains Aug and 2019 and its color is shown as in below screenshot. I have tried to refer slideMaster1.xml and theme1.xml as per relationship but didn't get any success. Can you please help me to identify from where PPT is getting its formatting.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<p:sld xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main">
<p:cSld>
<p:spTree>
<p:nvGrpSpPr>
<p:cNvPr id="1" name=""/>
<p:cNvGrpSpPr/>
<p:nvPr/>
</p:nvGrpSpPr>
<p:grpSpPr>
<a:xfrm>
<a:off x="0" y="0"/>
<a:ext cx="0" cy="0"/>
<a:chOff x="0" y="0"/>
<a:chExt cx="0" cy="0"/>
</a:xfrm>
</p:grpSpPr>
<p:sp>
<p:nvSpPr>
<p:cNvPr id="7" name="Title 1"/>
<p:cNvSpPr>
<a:spLocks noGrp="1"/>
</p:cNvSpPr>
<p:nvPr>
<p:ph type="ctrTitle"/>
</p:nvPr>
</p:nvSpPr>
<p:spPr>
<a:xfrm>
<a:off x="419535" y="1935956"/>
<a:ext cx="6743266" cy="1271588"/>
</a:xfrm>
</p:spPr>
<p:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" sz="3600" dirty="0"/>
<a:t>PPTX to HTML</a:t>
</a:r>
<a:br>
<a:rPr lang="en-US" sz="3600" dirty="0"/>
</a:br>
<a:endParaRPr lang="en-US" i="1" dirty="0">
<a:solidFill>
<a:srgbClr val="0070C0"/>
</a:solidFill>
</a:endParaRPr>
</a:p>
</p:txBody>
</p:sp>
<p:sp>
<p:nvSpPr>
<p:cNvPr id="4" name="Subtitle 2">
<a:extLst>
<a:ext uri="{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}">
<a16:creationId xmlns:a16="http://schemas.microsoft.com/office/drawing/2014/main" id="{4C91A161-6A53-4B2D-8EAA-F349574D0CD9}"/>
</a:ext>
</a:extLst>
</p:cNvPr>
<p:cNvSpPr>
<a:spLocks noGrp="1"/>
</p:cNvSpPr>
<p:nvPr>
<p:ph type="subTitle" idx="1"/>
</p:nvPr>
</p:nvSpPr>
<p:spPr>
<a:xfrm>
<a:off x="419535" y="3867150"/>
<a:ext cx="2476066" cy="533400"/>
</a:xfrm>
</p:spPr>
<p:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US"/>
<a:t>Aug </a:t>
</a:r>
<a:r>
<a:rPr lang="en-US" dirty="0"/>
<a:t>2019</a:t>
</a:r>
</a:p>
</p:txBody>
</p:sp>
</p:spTree>
<p:extLst>
<p:ext uri="{BB962C8B-B14F-4D97-AF65-F5344CB8AC3E}">
<p14:creationId xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main" val="3413077856"/>
</p:ext>
</p:extLst>
</p:cSld>
<p:clrMapOvr>
<a:masterClrMapping/>
</p:clrMapOvr>
</p:sld>
The correct reference is slide.xml -> slideLayout.xml -> slideMaster.xml i.e. if you don't find it in slide.xml check in slideLayout.xml and if you still don't find it there, check in slideMaster.xml. In your example <p:ph type="subTitle" idx="1"/> the ph means it's a placeholder so probably the styling will be found in slideLayout. When checking in the other files, look for <sp> node with same type and idx or just type where idx is not specified.
Example
SP node in slide.xml
<p:sp>
<p:nvSpPr>
<p:cNvPr id="4" name="Title 3"/>
<p:cNvSpPr>
<a:spLocks noGrp="1"/>
</p:cNvSpPr>
<p:nvPr>
<p:ph type="title"/>
</p:nvPr>
</p:nvSpPr>
<p:spPr/>
<p:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>Agenda</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</p:txBody>
</p:sp>
SP node in slideLayout.xml
<p:sp>
<p:nvSpPr>
<p:cNvPr id="5" name="Title 1"/>
<p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr>
<p:nvPr><p:ph type="title" hasCustomPrompt="1"/></p:nvPr>
</p:nvSpPr>
<p:spPr>
<a:xfrm>
<a:off x="457200" y="51470"/>
<a:ext cx="8229600" cy="637580"/>
</a:xfrm>
<a:prstGeom prst="rect">
<a:avLst/>
</a:prstGeom>
</p:spPr>
<p:txBody>
<a:bodyPr>
<a:scene3d>
<a:camera prst="orthographicFront"/>
<a:lightRig rig="flat" dir="t">
<a:rot lat="0" lon="0" rev="18900000"/>
</a:lightRig>
</a:scene3d>
<a:sp3d extrusionH="31750" contourW="6350" prstMaterial="powder">
<a:bevelT w="19050" h="19050" prst="angle"/>
<a:contourClr>
<a:schemeClr val="accent3">
<a:tint val="100000"/>
<a:shade val="100000"/>
<a:satMod val="100000"/>
<a:hueMod val="100000"/>
</a:schemeClr>
</a:contourClr>
</a:sp3d>
</a:bodyPr>
<a:lstStyle>
<a:lvl1pPr algn="l">
<a:defRPr sz="3000" b="1" i="0" cap="none" spc="0">
<a:ln/>
<a:solidFill>
<a:srgbClr val="000090"/>
</a:solidFill>
<a:effectLst/>
<a:latin typeface="Timeless-Bold"/>
<a:cs typeface="Timeless-Bold"/>
</a:defRPr>
</a:lvl1pPr>
</a:lstStyle>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0"/>
<a:t>Click to edit title in one line</a:t>
</a:r>
<a:endParaRPr lang="en-SG" dirty="0"/>
</a:p>
</p:txBody>
</p:sp>
In the example above you can then get the styling for the text 'Agenda' in slide.xml from <p:sp> -> <p:txBody> -> <a:lstStyle> -> <a:lvl1pPr> -> <a:defRPr> in slideLayout.xml
Trying to use Visual Studio 2017 to do this: Why is the header not showing in MS WORD? I tried to simplified from a real dotx document that was saved as XML. I managed to make it work with plain body text and even floating images in the body. But before I could work on images in header/footer, I am trying to test it with plain text in the header, but I just can't seem to figure out how to make it work. Thank you! See full XML script below:
<pkg:package xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage">
<pkg:part pkg:name="/_rels/.rels" pkg:contentType="application/vnd.openxmlformats-package.relationships+xml" pkg:padding="512">
<pkg:xmlData>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/>
</Relationships>
</pkg:xmlData>
</pkg:part>
<pkg:part pkg:name="/word/_rels/document.xml.rels" pkg:contentType="application/vnd.openxmlformats-package.relationships+xml" pkg:padding="256">
<pkg:xmlData>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Id="rId6" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header" Target="header1.xml"/>
<Relationship Id="rId7" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header" Target="header2.xml"/>
</Relationships>
</pkg:xmlData>
</pkg:part>
<pkg:part pkg:name="/word/document.xml" pkg:contentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml">
<pkg:xmlData>
<w:document xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" >
<w:sectPr>
<w:headerReference r:id="rId6" w:type="first"/>
<w:headerReference r:id="rId7" w:type="default"/>
</w:sectPr>
<w:body>
<w:p>
<w:r>
<w:rPr>
<w:noProof/>
</w:rPr>
<w:t>testing 193</w:t>
</w:r>
</w:p>
</w:body>
</w:document>
</pkg:xmlData>
</pkg:part>
<pkg:part pkg:name="/word/header1.xml" pkg:contentType="application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml">
<pkg:xmlData>
<w:hdr xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml">
<w:p>
<w:pPr>
<w:pStyle w:val="Header"/>
</w:pPr>
<w:r>
<w:t>helo this is first header</w:t>
</w:r>
</w:p>
</w:hdr>
</pkg:xmlData>
</pkg:part>
<pkg:part pkg:name="/word/header2.xml" pkg:contentType="application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml">
<pkg:xmlData>
<w:hdr xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml">
<w:p>
<w:pPr>
<w:pStyle w:val="Header"/>
</w:pPr>
<w:r>
<w:t>helo this is default header</w:t>
</w:r>
</w:p>
</w:hdr>
</pkg:xmlData>
</pkg:part>
</pkg:package>
We are currently developing a SOAP API request that requires a SAML Authentication:
Here is the response we got from the Security Token Service of our provider:
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<a:Action s:mustUnderstand="1">http://docs.oasis-open.org/ws-sx/ws-trust/200512/RSTRC/IssueFinal</a:Action>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<u:Timestamp u:Id="_0">
<u:Created>2019-05-28T03:58:09.114Z</u:Created>
<u:Expires>2019-05-28T04:03:09.114Z</u:Expires>
</u:Timestamp>
</o:Security>
</s:Header>
<s:Body>
<trust:RequestSecurityTokenResponseCollection xmlns:trust="http://docs.oasis-open.org/ws-sx/ws-trust/200512">
<trust:RequestSecurityTokenResponse>
<trust:KeySize>256</trust:KeySize>
<trust:Lifetime>
<wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2019-05-28T03:58:09.114Z</wsu:Created>
<wsu:Expires xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2019-05-28T04:58:09.114Z</wsu:Expires>
</trust:Lifetime>
<wsp:AppliesTo xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>http://idibilling.com/webservices</wsa:Address>
</wsa:EndpointReference>
</wsp:AppliesTo>
<trust:RequestedSecurityToken>
<xenc:EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
<xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc"/>
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<e:EncryptedKey xmlns:e="http://www.w3.org/2001/04/xmlenc#">
<e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p">
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
</e:EncryptionMethod>
<KeyInfo>
<o:SecurityTokenReference xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<X509Data>
<X509IssuerSerial>
<X509IssuerName>XXXXXXXXX</X509IssuerName>
<X509SerialNumber>123456789</X509SerialNumber>
</X509IssuerSerial>
</X509Data>
</o:SecurityTokenReference>
</KeyInfo>
<e:CipherData>
<e:CipherValue>Y1fId9FFPZfhSOhiPj61Mbqx3fdIpvUeY0SlwTXdOSDkS06PFks7pM209sfwakkvxkdAG7iovy7gpDFlmAkq7ePKMCZhztgBJWnHuzylB3sEyncXXQCrzbJDIqYUXqp/ZJ7SVBp/XPq/jtimhCiHrbm5SGIW+v3R+Zf1lWWUsn9QXaqbj00uKhWKl1EV491SoswCYXAtUdSRSd+Ex+ATK9gvO95LShdUvbEwWYYKyoxKuKyE6sjBiMUan3N/qBK0z7ku0fopRKjbfWPRbdB7tEM7n2f08fxScDzPjFTGsCZz4kDEm7UaRLOYeCQVkhH4tFrS+D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mArW96vLcuEXOlFTZLlJ0LKHzDT5Wi0Cq9ihlctnLmmRmwJ1y/Wenx/eeLYvIFblBohmrVKZao0HbVAjIR2H08fQpczAgThdG8qVxjaNzgZRzWVbIaXn1efEsLQ0gDcNftb2f+sH491h6MHDI4kcLQZ0jc0V7rJE4XUya1RsU+FGMW7Fareq3E024pALJbnu0C3TgPu1Acvv4ajN4HUC7qwGGeXPy1XGUN+OqM</xenc:CipherValue>
</xenc:CipherData>
</xenc:EncryptedData>
</trust:RequestedSecurityToken>
<trust:RequestedProofToken>
<trust:BinarySecret>bOkZdTCufrwieMmOdcO5T1e+JSzlDB5SlcLhPgWwlsE=</trust:BinarySecret>
</trust:RequestedProofToken>
<trust:RequestedAttachedReference>
<o:SecurityTokenReference k:TokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:k="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd">
<o:KeyIdentifier ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#SAMLAssertionID">_a13abe92-0956-407b-ae40-8266bd218521</o:KeyIdentifier>
</o:SecurityTokenReference>
</trust:RequestedAttachedReference>
<trust:RequestedUnattachedReference>
<o:SecurityTokenReference k:TokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:k="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd">
<o:KeyIdentifier ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#SAMLAssertionID">_a13abe92-0956-407b-ae40-8266bd218521</o:KeyIdentifier>
</o:SecurityTokenReference>
</trust:RequestedUnattachedReference>
<trust:TokenType>urn:oasis:names:tc:SAML:1.0:assertion</trust:TokenType>
<trust:RequestType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Issue</trust:RequestType>
<trust:KeyType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/SymmetricKey</trust:KeyType>
</trust:RequestSecurityTokenResponse>
</trust:RequestSecurityTokenResponseCollection>
</s:Body>
</s:Envelope>
What we want to accomplish is to consume this SAML Response so we can use it in a security header like this one:
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header>
<o:Security xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<u:Timestamp u:Id="_0" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<u:Created>2019-05-21T05:05:05.573Z</u:Created>
<u:Expires>2019-05-21T05:10:05.573Z</u:Expires>
</u:Timestamp>
<xenc:EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
<xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc"/>
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<e:EncryptedKey xmlns:e="http://www.w3.org/2001/04/xmlenc#">
<e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p">
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
</e:EncryptionMethod>
<KeyInfo>
<o:SecurityTokenReference xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<X509Data>
<X509IssuerSerial>
<X509IssuerName>XXXXXXX</X509IssuerName>
<X509SerialNumber>123456789</X509SerialNumber>
</X509IssuerSerial>
</X509Data>
</o:SecurityTokenReference>
</KeyInfo>
<e:CipherData>
<e:CipherValue>LGRkzAOljXa1jSLVJijxJoYtsEf0ac5zZKxBHxEddowiMSDUI03Ggw5GTvl5/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jiWxOiQdVnqlRAaDLekuihnBdn74Ru1C0rRebg+vHJeDayA0lZoVaoPdoBIqG9Xgt54oTU1lhQFpXcXb2oJwuZugvbue3vP9Jd3JtJI3gAvygz7Of+VSgX9xUwBwGgVsMsbT7S6j0xwnq7TlMp8WSNtU/ToZNOsm0mcOTzeipeUsmJQaZX3oE1pel8v7LEmaGYKV2yA4K6Og92C3YduJvW+p5YiQ9AA+MIGFawvVOE6m5XBQiDWla/eFutXF0sgNnhQkhhiQG9hUO+S055wk8SFORt109DXvkeaSdlo2ufk3mcvbobBdr8OVlbT6z1ddxd2mIHAK1olfaU4WLsEGGgsbEHrnLMFfi39tiO+fhVQB2oDlDTQolqS88qFlmceDkAmWpxvALG3GJOvc1Yl6Yc36eZO0i9rfpjaywPsTq2pArlnYYnzWdiMwX9mVxZz4FkEBf6J/yT9k=</xenc:CipherValue>
</xenc:CipherData>
</xenc:EncryptedData>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/>
<Reference URI="#_0">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>dl7TJsR0gVfPKQ/CVl2eDQpa0Ic=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>T+DZmdJXWeNnnfMXA0bZOKNJ5b8=</SignatureValue>
<KeyInfo>
<o:SecurityTokenReference k:TokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:k="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd">
<o:KeyIdentifier ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#SAMLAssertionID">_b49d8768-4b11-4032-95f0-d4c85bc3dad0</o:KeyIdentifier>
</o:SecurityTokenReference>
</KeyInfo>
</Signature>
</o:Security>
</s:Header>
<s:Body><CustomerLookup xmlns="http://webservices.idibilling.com/Customer/1.0"><Requestor xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><AuthorizationToken>deprecated</AuthorizationToken><RegisterID>0</RegisterID></Requestor><Request xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><CustomerID><AuthenticatedKey>deprecated</AuthenticatedKey><ID>25020</ID></CustomerID><ResponseGroups><ResponseGroup>BalanceSummary</ResponseGroup></ResponseGroups></Request></CustomerLookup></s:Body></s:Envelope>
So far we do not have any knowledge on how to get the following value to construct the Security Header:
Digest Value
Signature Value
Security Token Reference
Any help would be appreciated. Thank you in advance.
I'm going through this, pretty good, document (http://dev.office.com/docs/add-ins/word/create-better-add-ins-for-word-with-office-open-xml?product=word) to understand OOXML better and to use it in a Word Addin.
To test my created OOXM, I use this sample: http://dev.office.com/code-samples-detail/5789.
Simple stuff works, but when I try to set the headers of the document it doesn't seem to work.
Here's the OOXML snippet:
<pkg:package xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage">
<pkg:part pkg:name="/_rels/.rels" pkg:contentType="application/vnd.openxmlformats-package.relationships+xml" pkg:padding="512">
<pkg:xmlData>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/>
</Relationships>
</pkg:xmlData>
</pkg:part>
<pkg:part pkg:name="/word/_rels/document.xml.rels" pkg:contentType="application/vnd.openxmlformats-package.relationships+xml" pkg:padding="256">
<pkg:xmlData>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Id="rId7" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header" Target="header2.xml"/>
<Relationship Id="rId6" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header" Target="header1.xml"/>
</Relationships>
</pkg:xmlData>
</pkg:part>
<pkg:part pkg:name="/word/document.xml" pkg:contentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml">
<pkg:xmlData>
<w:document xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se wp14">
<w:body>
<w:p w:rsidR="003F424D" w:rsidRDefault="003F424D">
<w:bookmarkStart w:id="0" w:name="_GoBack"/>
<w:bookmarkEnd w:id="0"/>
<w:r>
<w:br w:type="page"/>
</w:r>
</w:p>
<w:p w:rsidR="00C24E89" w:rsidRDefault="009F0685"/>
<w:sectPr w:rsidR="00C24E89" w:rsidSect="003F424D">
<w:headerReference w:type="default" r:id="rId6"/>
<w:headerReference w:type="first" r:id="rId7"/>
<w:pgSz w:w="12240" w:h="15840"/>
<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:titlePg/>
<w:docGrid w:linePitch="360"/>
</w:sectPr>
</w:body>
</w:document>
</pkg:xmlData>
</pkg:part>
<pkg:xmlData>
<w:endnotes xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se wp14">
<w:endnote w:type="separator" w:id="-1">
<w:p w:rsidR="009F0685" w:rsidRDefault="009F0685" w:rsidP="003F424D">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:lineRule="auto"/>
</w:pPr>
<w:r>
<w:separator/>
</w:r>
</w:p>
</w:endnote>
<w:endnote w:type="continuationSeparator" w:id="0">
<w:p w:rsidR="009F0685" w:rsidRDefault="009F0685" w:rsidP="003F424D">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:lineRule="auto"/>
</w:pPr>
<w:r>
<w:continuationSeparator/>
</w:r>
</w:p>
</w:endnote>
</w:endnotes>
</pkg:xmlData>
</pkg:part>
<pkg:part pkg:name="/word/header1.xml" pkg:contentType="application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml">
<pkg:xmlData>
<w:hdr xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se wp14">
<w:p w:rsidR="003F424D" w:rsidRPr="003F424D" w:rsidRDefault="003F424D">
<w:pPr>
<w:pStyle w:val="Koptekst"/>
<w:rPr>
<w:lang w:val="nl-NL"/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:lang w:val="nl-NL"/>
</w:rPr>
<w:t>OtherPagesHeader</w:t>
</w:r>
</w:p>
</w:hdr>
</pkg:xmlData>
</pkg:part>
<pkg:part pkg:name="/word/header2.xml" pkg:contentType="application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml">
<pkg:xmlData>
<w:hdr xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se wp14">
<w:p w:rsidR="003F424D" w:rsidRPr="003F424D" w:rsidRDefault="003F424D">
<w:pPr>
<w:pStyle w:val="Koptekst"/>
<w:rPr>
<w:lang w:val="nl-NL"/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:lang w:val="nl-NL"/>
</w:rPr>
<w:t>FirstPageHeader</w:t>
</w:r>
</w:p>
</w:hdr>
</pkg:xmlData>
</pkg:part>
<pkg:xmlData>
<w:fonts xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" mc:Ignorable="w14 w15 w16se">
<w:font w:name="Calibri">
<w:panose1 w:val="020F0502020204030204"/>
<w:charset w:val="00"/>
<w:family w:val="swiss"/>
<w:pitch w:val="variable"/>
<w:sig w:usb0="E0002AFF" w:usb1="C000247B" w:usb2="00000009" w:usb3="00000000" w:csb0="000001FF" w:csb1="00000000"/>
</w:font>
<w:font w:name="Times New Roman">
<w:panose1 w:val="02020603050405020304"/>
<w:charset w:val="00"/>
<w:family w:val="roman"/>
<w:pitch w:val="variable"/>
<w:sig w:usb0="E0002EFF" w:usb1="C000785B" w:usb2="00000009" w:usb3="00000000" w:csb0="000001FF" w:csb1="00000000"/>
</w:font>
<w:font w:name="Calibri Light">
<w:panose1 w:val="020F0302020204030204"/>
<w:charset w:val="00"/>
<w:family w:val="swiss"/>
<w:pitch w:val="variable"/>
<w:sig w:usb0="E0002AFF" w:usb1="C000247B" w:usb2="00000009" w:usb3="00000000" w:csb0="000001FF" w:csb1="00000000"/>
</w:font>
</w:fonts>
</pkg:xmlData>
</pkg:part>
I'm a bit confused on what I'm missing here to make this work.
upon further investigation, you cannot modify the header visibility with OOXML. the good news is that we are going to include a few properties at the section level to enable showing primary and even-page headers.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<?mso-application progid="Word.Document"?>
<pkg:package xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage">
<pkg:part pkg:name="/_rels/.rels" pkg:contentType="application/vnd.openxmlformats-package.relationships+xml" pkg:padding="512">
<pkg:xmlData>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml" />
</Relationships>
</pkg:xmlData>
</pkg:part>
<pkg:part pkg:name="/word/_rels/document.xml.rels" pkg:contentType="application/vnd.openxmlformats-package.relationships+xml" pkg:padding="256">
<pkg:xmlData>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image1.png" />
</Relationships>
</pkg:xmlData>
</pkg:part>
<pkg:part pkg:name="/word/document.xml" pkg:contentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml">
<pkg:xmlData>
<w:document mc:Ignorable="w14 w15 wp14" xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape">
<w:body>
<w:p w:rsidR="00AE3E50" w:rsidRDefault="00DE2072">
<w:r>
<w:drawing>
<wp:inline distT="0" distB="0" distL="0" distR="0">
<wp:extent cx="2194560" cy="1463040" />
<wp:docPr id="1" name="My Video" />
<wp:cNvGraphicFramePr>
<a:graphicFrameLocks noChangeAspect="1" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" />
</wp:cNvGraphicFramePr>
<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">
<a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture">
<pic:pic xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture">
<pic:nvPicPr>
<pic:cNvPr id="1" name="" />
<pic:cNvPicPr />
</pic:nvPicPr>
<pic:blipFill>
<a:blip r:embed="rId2">
<a:extLst>
<a:ext uri="{28A0092B-C50C-407E-A947-70E740481C1C}">
<a14:useLocalDpi val="0" xmlns:a14="http://schemas.microsoft.com/office/drawing/2010/main" />
</a:ext>
<a:ext uri="{C809E66F-F1BF-436E-b5F7-EEA9579F0CBA}">
<wp15:webVideoPr embeddedHtml="<iframe width="800" height="600" src="http://www.youtube.com/embed/qk51u8-4uo4" frameborder="0" allowfullscreen></iframe>" w="800" h="600" xmlns:wp15="http://schemas.microsoft.com/office/word/2012/wordprocessingDrawing" />
</a:ext>
</a:extLst>
</a:blip>
<a:stretch>
<a:fillRect />
</a:stretch>
</pic:blipFill>
<pic:spPr>
<a:xfrm>
<a:off x="0" y="0" />
<a:ext cx="2194560" cy="1463040" />
</a:xfrm>
<a:prstGeom prst="rect">
<a:avLst />
</a:prstGeom>
</pic:spPr>
</pic:pic>
</a:graphicData>
</a:graphic>
</wp:inline>
</w:drawing>
</w:r>
</w:p>
</w:body>
</w:document>
</pkg:xmlData>
</pkg:part>
<pkg:part pkg:name="/word/media/image1.png" pkg:contentType="image/png" pkg:compression="store">
<pkg:binaryData>
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAHN6w8ZAAAAAXNSR0IArs4c6QAAAARnQU1BAACx
jwv8YQUAAAAGUExURQAAAAAAAKVnuc8AAAACdFJOU/8A5bcwSgAAAAlwSFlzAAAOxAAADsQBlSsO
GwAAAAxJREFUGFdjYBgYAAAAeAABoRR6NAAAAABJRU5ErkJggg==
</pkg:binaryData>
</pkg:part>
</pkg:package>
I'm not sure whether above one is correct or not but it keeps giving me error "Invalid format" while adding to MS word using programming".
The error is
Error Message: The format of the specified data object is invalid.
Error Code: 2006
Here is click event for the buttonw which is inserting code...
Office.context.document.setSelectedDataAsync
(
xmlCode,
{ coercionType: "ooxml" },
function (result)
{
console.log("test");
}
);
variable xmlCode is consists of ooxml code as string data.
It's solved now...
The mistake that I was doing is, I have placed the ooxml code inside a <textarea> html element. So while it was being rendered inside browser, the html encoded iframe code was converted into HTML tags which was causing issue. I updated my code, removed ooxml code from <textarea> and placed it directly as string to variable and the problem was solved.
Now, I'm able to embed video using office.js
I'm not entirely sure that the OOXML data should be a string.
Writing data from apps to Office documents suggests that you should be using a CustomXmlNode object:
In the event that you cannot insert content through any of the above methods, and if you are in Word 2013, you can directly alter the structure of the document by inserting OOXML nodes. This gets complicated fast—refer to the Apps for Office CustomXmlNode APIs for more information.
(I especially love "this gets complicated fast"...sure makes me excited to use that API!)