Knowledge base KB0206

think-cell uses wrong font color

Problem

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

Solution

The problem was caused by a bug in PowerPoint. As of July 2017, Microsoft fixed the problem in Office 365 and Office 2016. Office 365 and the Office 2016 Click-to-Run editions received the fix with the update to Version 1706 (Build 8229.2073). The fix for the MSI-based edition of Office 2016 was included in KB3203481.

Explanation and workaround if your Office version is not fixed

think-cell tries to determine the correct font color based on the font colors your PowerPoint template provides. PowerPoint versions containing the bug tell 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 Insert > New 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(txtfrm2 As PowerPoint.TextFrame2) As Office.TextRange2
    Set AppendToTextRange = _
	txtfrm2.TextRange.Characters(txtfrm2.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.Design.SlideMaster
    
    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 txtfrm2 As PowerPoint.TextFrame2
    Set txtfrm2 = shp.TextFrame2
    
    Dim txtrng2 As Office.TextRange2
    Dim i As Integer
    i = 1
    Dim txtlvl As PowerPoint.TextStyleLevel
    For Each txtlvl In mstr.TextStyles(PowerPoint.ppBodyStyle).Levels
        Set txtrng2 = AppendToTextRange(txtfrm2)
        txtrng2.Text = "TextStyleLevel[" & i & "] has color " & vbCr
        txtrng2.Font.Fill.Solid
        txtrng2.Font.Fill.ForeColor.ObjectThemeColor = Office.msoThemeColorText1
        
        Set txtrng2 = AppendToTextRange(txtfrm2)
        Dim col As PowerPoint.ColorFormat
        
        Set col = txtlvl.Font.Color
        If PowerPoint.ppSchemeColorMixed = col.Type Then
            txtrng2.Text = "MIXED (should not occur)" & vbCr & vbCr
        Else
            If Office.msoNotThemeColor = col.ObjectThemeColor Then
                Dim nRgb As Long
                nRgb = col.RGB()
                txtrng2.Text = "RGB: " & (nRgb Mod 256) & "/" & ((nRgb \ 256) _
                Mod 256) & "/" & (nRgb \ 256 \ 256) & vbCr & vbCr
                txtrng2.Font.Fill.ForeColor.RGB = nRgb
            Else
                txtrng2.Text = "ObjectThemeColor: " & col.ObjectThemeColor _
                & vbCr & vbCr
                txtrng2.Font.Fill.ForeColor.ObjectThemeColor = col.ObjectThemeColor
            End If
        End If
        i = i + 1
    Next txtlvl
End Sub

Workaround

Insert missing placeholders on the slide master of your PowerPoint presentation:

  1. Open the slide master: PowerPoint > View > Master Views > Slide Master
  2. Go to the top level slide in the thumbnail sidebar
  3. In most cases, the issue can be solved by inserting the missing Text and/or Title placeholder:
    Master Layout > Master Layout > tick Text and/or Title> OK
  4. Close slide master: Close > Close 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. Templates or presentations may contain more than one affected slide master; apply the workaround to all of them.

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

If your company has a Microsoft Office Support contract and you want to ask Microsoft to fix your Office version as well, please refer to our Microsoft case number 116080514511540.

Contact support

If think-cell still does not use the correct font color although you are using a fixed Office version or applied the workaround, please send an example slide to our support team and tell us your preferred font color.

Share