Knowledge base KB0219

When inserting a think-cell element, the element has a gradient and the color format cannot be changed

Problem

When I insert a think-cell feature such as a level difference arrow or value line, their lines are rendered with a color gradient. I cannot change the line color.

Level Difference Arrow shown with a gradient

Cause

PowerPoint provides an option to define a default line style per presentation or per template. However, due to a limitation in PowerPoint's programming interface there is no way for an add-in such as think-cell to change or query the current default line style.

The issue is reproducible without think-cell.

Reproduction without think-cell

  1. Open an new PowerPoint presentation.
  2. Insert a new line by selecting HomeDrawingLine.
  3. Right-click the line → Format Shape and select Fill and LineLineGradient Line.
  4. Right-click the line and select Set as Default Line.
  5. Open the VBA editor with Alt+F11. Select your workbook and click on InsertModule. Then paste the InsertDefaultLine() macro, which tries to insert a black line, and run it by pressing F5:
Sub InsertDefaultLine()
    Dim sld As Slide
    Set sld = PowerPoint.ActiveWindow.View.Slide 'The current slide
    
    Dim ln As Shape
    Set ln = sld.Shapes.AddLine(10, 10, 250, 250) 'Add default line to slide
    ln.Select
    ln.Line.Weight = 20
    MsgBox "Now specifying a line color of black"
    ln.Line.ForeColor.RGB = Black
End Sub
The inserted line retains the default line style instead of the color specified, which is black.

Solution

To resolve the issue a new, non-gradient line should be set as the default:

  1. Insert a new line by selecting HomeDrawingLine.
  2. Right-click the line → Format Shape and select Fill and LineLineSolid Line.
  3. Right-click the line and select Set as Default Line.

We have contacted Microsoft and requested adding programmatic access to the gradient settings, but so far they have declined to do so. 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 117112417215306.