2
我试图以编程方式将内容插入Powerpoint的Notes页面。同一行上会有不同的彩色文字。我只通过段落得到它,但这样做会使它们出现在不同的路线上。VSTO Powerpoint注释页面 - 同一行上的不同颜色的文字
这是我曾尝试:
var slideRange = Application.ActivePresentation.Slides;
slideRange[1].NotesPage.Shapes[2].TextFrame.TextRange.Paragraphs(1).Font.Color.RGB = Color.Black;
slideRange[1].NotesPage.Shapes[2].TextFrame.TextRange.Paragraphs(1).Text = "word1\r";
slideRange[1].NotesPage.Shapes[2].TextFrame.TextRange.Paragraphs(2).Font.Color.RGB = Color.Gray;
slideRange[1].NotesPage.Shapes[2].TextFrame.TextRange.Paragraphs(2).Text = "word2\r";
的2个字出来的不同颜色,但我想有他们在同一行。
我曾尝试通过TextRange(TextRange.Font.Color)设置颜色,但是这似乎是只读属性。
Picture showing what I wish to achieve