对于PPT的操作,在标题上添加了文本和图片,怎么让文本置于顶层,不然图片会被覆盖住!
PowerPoint.Presentation presentation = this.Application.Presentations.Add();
PowerPoint.CustomLayout customLayout =
presentation.SlideMaster.CustomLayouts[PowerPoint.PpSlideLayout.ppLayoutTitle];
PowerPoint.Slide slide = presentation.Slides.AddSlide(1, customLayout);
string filePath = "C:\\图片1.jpg";
PowerPoint.Shape pic;
pic = slide.Shapes.AddPicture(filePath, Office.MsoTriState.msoFalse, Office.MsoTriState.msoTrue
, slide.Shapes[1].Left, slide.Shapes[1].Top, slide.Shapes[1].Width, slide.Shapes[1].Height);
pic.Height = slide.Shapes[1].Height;
pic.Width = slide.Shapes[1].Width;
slide.Shapes.Title.TextFrame.TextRange.Text = "123456";
slide.Shapes.Title.TextFrame.TextRange.Font.Color.RGB = Color.Red.ToArgb();
slide.Shapes.Title.TextFrame.TextRange.Font.Size = 52;
slide.Shapes[2].Delete();