Quantcast
Channel: Open XML Format SDK forum
Viewing all articles
Browse latest Browse all 1288

PowerPoint: How to change footer in slide on shape stores in master

$
0
0

Hi.

like to set the footer text on a slide. I can set it with the following code, but it appears not at the location defined in the master. I am quite new to OpenXML, perhaps somebody can give me a hint.

Actually using the following function to create shape with Placeholder like Title or Footer. But the shapes appears at the same location and not in the footer, SubTitle,... positions defined in the master.

 slidePart.Slide.CommonSlideData.ShapeTree.AppendChild(GenerateTitleShape(Slide.Title, PlaceholderValues.Title));
                        slidePart.Slide.CommonSlideData.ShapeTree.AppendChild(GenerateTitleShape(Slide.SubTitle, PlaceholderValues.SubTitle));
                        slidePart.Slide.CommonSlideData.ShapeTree.AppendChild(GenerateTitleShape(Slide.Title, PlaceholderValues.Footer));

private Shape GenerateTitleShape(string title, PlaceholderValues type ) { _DrawingObjectId++; Shape titleShape = new Shape(); titleShape.NonVisualShapeProperties = new NonVisualShapeProperties (new NonVisualDrawingProperties() { Id = _DrawingObjectId, Name = "Title" }, new NonVisualShapeDrawingProperties(new a.ShapeLocks() { NoGrouping = true }), new ApplicationNonVisualDrawingProperties(new PlaceholderShape() { Type = type })); titleShape.ShapeProperties = new ShapeProperties(); // Specify the text of the title shape. titleShape.TextBody = new TextBody(new a.BodyProperties(),new a.ListStyle()); titleShape.TextBody.Append(new a.Paragraph(new a.Run(new a.Text(title)))); return titleShape; }





Viewing all articles
Browse latest Browse all 1288

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>