Hi Rachel,
Hope you are doing well.
It seems there is an issue with the table while coloring the cell text of it in power-point using spire.presentation.it is not giving any error but also not doing the color of text.
Please see attached input(OrgChartsClassic_Template.pptx) and output(Output not coloring the text in a table cell.pptx) file for your reference which i have used for code.
As you can see in my input and output file, I am coloring the text of cell in second row and first column in a table- as Medium Blue RBG 0, 131, 169 but it is not doing. same thing like this doing for second row and column in same table as Medium Gray R150, G150, B150 but it did nothing here as well.
Same like the above i am doing for the second row and third & fourth column coloring of text of cell in a table.nothing colored in text.
i have used the below code and no error comes but it also won't do the required color to text.
Dim ppt As Presentation = New Presentation()
ppt.LoadFromFile("C:\Users\A0741818\Documents\Visual Studio 2015\WebSites\Hyperlink Error on node in SmartArt in PPT\OrgChartsClassic_Template.pptx")
Dim tbl As ITable
For Each shapenew As IShape In ppt.Slides(0).Shapes
If TypeOf shapenew Is ITable Then
tbl = shapenew
Exit For
End If
Next
tbl(0, 1).TextFrame.Paragraphs(0).TextRanges.Clear()
tbl(0, 1).TextFrame.Paragraphs(0).Text = "Position Ttitle"
tbl(0, 1).TextFrame.TextRange.LatinFont = New TextFont("Arial")
tbl(0, 1).TextFrame.TextRange.FontHeight = 10
tbl(0, 1).TextFrame.TextRange.Fill.SolidColor.Color = Color.FromArgb(0, 131, 169)
tbl(1, 1).TextFrame.Paragraphs(0).TextRanges.Clear()
tbl(1, 1).TextFrame.Paragraphs(0).Text = "Position ID"
tbl(1, 1).TextFrame.TextRange.LatinFont = New TextFont("Arial")
tbl(1, 1).TextFrame.TextRange.FontHeight = 10
tbl(1, 1).TextFrame.TextRange.Fill.SolidColor.Color = Color.FromArgb(150, 150, 150)
tbl(2, 1).TextFrame.Paragraphs(0).TextRanges.Clear()
tbl(2, 1).TextFrame.Paragraphs(0).Text = "Incumbent Name"
tbl(2, 1).TextFrame.TextRange.LatinFont = New TextFont("Arial")
tbl(2, 1).TextFrame.TextRange.FontHeight = 10
tbl(2, 1).FillFormat.SolidColor.Color = Color.FromArgb(248, 248, 248)
tbl(2, 1).TextFrame.TextRange.Format.IsBold = Spire.Presentation.TriState.True
tbl(2, 1).TextFrame.TextRange.Fill.SolidColor.Color = Color.FromArgb(0, 131, 169)
tbl(3, 1).TextFrame.Paragraphs(0).TextRanges.Clear()
tbl(3, 1).TextFrame.Paragraphs(0).Text = "Incumbent ID"
tbl(3, 1).TextFrame.TextRange.LatinFont = New TextFont("Arial")
tbl(3, 1).TextFrame.TextRange.FontHeight = 10
tbl(3, 1).TextFrame.TextRange.Fill.SolidColor.Color = Color.FromArgb(150, 150, 150)
ppt.SaveToFile("C:\Users\A0741818\Documents\Visual Studio 2015\WebSites\Hyperlink Error on node in SmartArt in PPT\Output not coloring the text in a table cell.pptx", FileFormat.Pptx2013)
Please provide the solution for this asap as i have a urgent project deliverable.
Looking for a positive response. Thanks in advance.
Thanks & Regards,
Anil Kumar