Tag: textrange

如何从C#更改PowerPoint中TextRange的字体颜色?

我使用C#创建了一个PowerPoint演示文稿: PowerPoint.Application powerpointApplication; PowerPoint.Presentation pptPresentation; PowerPoint.Slide Slide; // Create an instance of PowerPoint. powerpointApplication = new PowerPoint.ApplicationClass(); // Create a PowerPoint presentation. pptPresentation = powerpointApplication.Presentations.Add( Microsoft.Office.Core.MsoTriState.msoTrue); // Create empty slide Slide = pptPresentation.Slides.Add(1, PowerPoint.PpSlideLayout.ppLayoutBlank); TextRange objTextRng = objSlide.Shapes[1].TextFrame.TextRange; objTextRng.Text = “Remote sensing calendar 1”; objTextRng.Font.Name = “Comic Sans MS”; objTextRng.Font.Size = 48; // TODO: change […]