I run PowerPoint in Office 365.
How to set font StrikeThrough in PowerPoint with C#? StrikeThrough doesn´t exist under PowerPoint Cell, TextFrame, TextRange and Font (StrikeThrough exist for Word and Excel).
Here is my code and I want t to add StrikeThrough as well in PowerPoint:
for (int r = 0; r < powerpointTable.Table.Rows.Count; r++)
{
for (int c = 0; c < powerpointTable.Table.Columns.Count; c++)
{
string cellData = "XXX";
PowerPoint.Cell cell = powerpointTable.Table.Cell(r + 1, c + 1);
PowerPoint.TextFrame txFrm = cell.Shape.TextFrame;
PowerPoint.TextRange range = txFrm.TextRange;
range.Font.Color.RGB = ColorTranslator.ToOle(Color.Black);
range.Font.Bold = MsoTriState.msoFalse;
range.Font.Italic = MsoTriState.msoFalse;
range.Font.Underline = MsoTriState.msoFalse;
range.Text = cellData;
}
}
powerpointTable is my table I PowerPoint and I using
PowerPoint = Microsoft.Office.Interop.PowerPoint;