Consulting

Results 1 to 4 of 4

Thread: Changing the color of text and shapes in all the presentation

  1. #1
    VBAX Newbie
    Joined
    Jan 2023
    Posts
    2
    Location

    Question Changing the color of text and shapes in all the presentation

    Hello,

    I print a lot of presentations, and in order to save ink I need to change the text color from whatever to black, and the shapes (that contain text) fill color from whatever to white.
    I keep the shapes that doesn't contain text with there original color.
    Sometimes I can do this by changing the color scheme or on the Slide Master, but in a lot of presentations the colors has been modified manuely, so I need to go through all the slides one by one and it takes a lot of time, especially when the presentation has 100+ slides.

    I need a VBA code that can automate this task for me.

    Thank you in advance.

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    This should be close but test on a COPY of the presentation first!

    Sub To_black()
    Dim osld As Slide
    Dim oshp As Shape
    For Each osld In ActivePresentation.Slides
    For Each oshp In osld.Shapes
    If oshp.HasTextFrame Then
    If oshp.TextFrame.HasText Then
    oshp.Fill.ForeColor.RGB = vbWhite
    oshp.TextFrame.TextRange.Font.Color.RGB = vbBlack
    End If
    End If
    Next oshp
    Next osld
    End Sub
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    VBAX Newbie
    Joined
    Jan 2023
    Posts
    2
    Location
    OMG it works perfectly, you can not imagine how much you helped me, thank you so much.

  4. #4
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    Glad it helped!
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •