Wie kann ich die Schriftfarbe ändern von einem TextRange-in PowerPoint von C#?

Erstellte ich eine PowerPoint-Präsentation mit C#:

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 color
//objTextRng.Font.Color 



//Save presentation
pptPresentation.SaveAs( BasePath + "result\\2_example.ppt", 
                       PowerPoint.PpSaveAsFileType.ppSaveAsDefault, 
                       MsoTriState.msoTrue //TODO: что за параметр???
                      );
pptPresentation.Close();

Nun, wie kann ich die Schriftfarbe ändern für objTextRng?

InformationsquelleAutor pesten | 2011-03-09

Schreibe einen Kommentar