3.7.2 Group and Linked Shapes within a Canvas
The following code example illustrates a drawing canvas that contains a shape and a group, which contains a picture and a shape. The two shapes are linked and share a text box story.
-
<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"> <a:graphicData uri="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"> <wpc:wpc> <wpc:bg/> <wpc:whole/> <wps:wsp> <wps:cNvPr id="3" name="Text Box 3"/> <wps:cNvSpPr txBox="1"/> <wps:spPr> … </wps:spPr> <wps:style> … </wps:style> <wps:txbx id="1"> <w:txbxContent> … </w:txbxContent> </wps:txbx> <wps:bodyPr … > … </wps:bodyPr> </wps:wsp> <wpg:wgp> <wpg:cNvPr id="5" name="Group 5"/> <wpg:cNvGrpSpPr/> <wpg:grpSpPr> </wpg:grpSpPr> <pic:pic xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture"> <pic:nvPicPr> <pic:cNvPr id="2" name="Picture 2"/> … </pic:nvPicPr> … </pic:pic> <wps:wsp> <wps:cNvPr id="4" name="Text Box 4"/> <wps:cNvSpPr txBox="1"/> <wps:spPr> … </wps:spPr> <wps:style> … </wps:style> <wps:linkedTxbx id="1" seq="1"/> <wps:bodyPr … > … </wps:bodyPr> </wps:wsp> </wpg:wgp> </wpc:wpc> </a:graphicData> </a:graphic>