Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Powerpoint 2010 VBA help with AddShape and back color

Status
Not open for further replies.

DougP

MIS
Dec 13, 1999
5,985
US
I want to set the background color of a rectangle. I figured out how to change the font color to black (green hiightlight) but the back color of the box itself illudes me. the yellow hightlight does nothing as well as putting it down in the "With .font" does nothing. So how do I change the background of a it to white. Now it's blue but I don't know how it got to be blue? none of the other shapes on the other slides are blue?
TIA
Code:
With myDocument.Shapes.AddShape(msoShapeRectangle, _
                 Centerline - 95, 10, ShapeWidth, ShapeHeight)
                 [highlight #FCE94F].Fill.BackColor.RGB = RGB(255, 255, 255)[/highlight]                 
                 .TextFrame2.TextRange.Text = FirstName & " " & Lastname & vbCrLf & _
                                    Title & vbCrLf & _
                                    GetOrganizationNameAccess(FullName) & vbCrLf & _
                                    GetCountsAccess(FullName)
                 
                 'ActivePresentation.Slides(2).Shapes.AddShape.TextFrame2.TextRange.Font.Fill.BackColor.
                 With .TextFrame2.TextRange.Font
                    .Name = "Tahoma"
                    .Size = 10
                    [highlight #8AE234].Fill.ForeColor.RGB = RGB(0, 0, 0)[/highlight]                 
            End With

DougP
 
I figured it out
just shut off the color

.Fill.Visible = msoFalse

DougP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top