Knowledge base KB0206

think-cell uses wrong font color

Problem

think-cell does not use the main text color defined in my PowerPoint's template.

Explanation

think-cell tries to determine the correct font color based on the font colors your PowerPoint template provides. Due to a bug, PowerPoint tells think-cell incorrect values for the font color if some placeholders are missing on the slide master’s top level slide. This problem can be reproduced without think-cell.

Reproduction without think-cell

The following macro inserts a new slide with a textbox showing the resulting font color values for each TextStyleLevel of your PowerPoint's slide master. "TextStyleLevel[1]" shows the main font color provided by PowerPoint.

  1. Open an affected PowerPoint file and open the VBA editor with Alt + F11
  2. In the VBA editor, select your presentation and click on InsertNew module
  3. Paste the following macro and close the VBA Editor
  4. In the PowerPoint presentation window, press Alt + F8 to open the Macro window
  5. Select Demonstrate and click Run
Function AppendToTextRange(txtfrm As PowerPoint.TextFrame) As PowerPoint.TextRange
    Set AppendToTextRange = txtfrm.TextRange.Characters(txtfrm.TextRange.Length + 1,0)
End Function

Sub Demonstrate()
    Dim pres As PowerPoint.Presentation
    Set pres = ActivePresentation
    
    Dim sld As PowerPoint.Slide
    Set sld = pres.Slides.Add(pres.Slides.Count + 1, PowerPoint.ppLayoutBlank)
    sld.Select
    
    Dim mstr As PowerPoint.Master
    Set mstr = sld.Master
    
    Dim shp As PowerPoint.Shape
    Set shp = sld.Shapes.AddShape(Office.msoShapeRectangle, 50, 50, _
    pres.PageSetup.SlideWidth / 2 - 50, pres.PageSetup.SlideHeight - 100)
    shp.Fill.ForeColor.RGB = RGB(255, 255, 122) 'light yellow backgound

    Dim txtfrm As PowerPoint.TextFrame
    Set txtfrm = shp.TextFrame
    
    Dim txtrng As PowerPoint.TextRange
    Dim i As Integer
    i = 1
    Dim txtlvl As PowerPoint.TextStyleLevel
    For Each txtlvl In mstr.TextStyles(PowerPoint.ppBodyStyle).Levels
        Set txtrng = AppendToTextRange(txtfrm)
        txtrng.Text = "TextStyleLevel[" & i & "] has color " & vbCrLf
        txtrng.Font.Color.SchemeColor = PowerPoint.ppForeground
        Set txtrng = AppendToTextRange(txtfrm)
        
        Dim col As PowerPoint.ColorFormat
        Set col = txtlvl.Font.Color
        If PowerPoint.ppSchemeColorMixed = col.Type Then
            txtrng.Text = "MIXED (should not occur)" & vbCrLf & vbCrLf
        Else
            If PowerPoint.ppNotSchemeColor = col.SchemeColor Then
                Dim nRgb As Long
                nRgb = col.RGB()
                txtrng.Text = "RGB: " & (nRgb Mod 256) & "/" & ((nRgb \ 256) _
				Mod 256) & "/" & (nRgb \ 256 \ 256) & vbCrLf & vbCrLf
                txtrng.Font.Color.RGB = nRgb
            Else
                txtrng.Text = "SchemeColor: " & col.SchemeColor & vbCrLf & vbCrLf
                txtrng.Font.Color.SchemeColor = col.SchemeColor
            End If
        End If
        i = i + 1
    Next txtlvl
End Sub

We have filed a case with Microsoft. If your company has a Microsoft Office Support contract and you want to contact Microsoft to ask for a fix, you may refer to Microsoft case number REG:116080514511540.

Workaround

As a workaround, insert missing placeholders on the slide master of your PowerPoint presentation:

  1. Open the slide master: PowerPoint → ViewMaster ViewsSlide Master
  2. Go to the top level slide in the thumbnail sidebar
  3. In most cases, the issue can be fixed by inserting the missing Text and/or Title placeholder:
    Master LayoutMaster Layout → tick Text and/or TitleOK
  4. Close slide master: CloseClose Master View
  5. Insert a new chart or update existing charts, e.g., by dragging them to a new position

If the problem still occurs afterwards, please repeat these steps but tick all missing placeholders in step 3.

You may want to include this fix in your PowerPoint template or contact the person responsible for your PowerPoint templates to update your default template.

Contact Support

In case think-cell still does not use the correct font color afterwards, please send an example file to our support team and tell us your preferred font color.