View Single Post
 
Old 08-30-2014, 03:31 PM
excelledsoftware excelledsoftware is offline Windows 7 64bit Office 2003
IT Specialist
 
Join Date: Jan 2012
Location: Utah
Posts: 455
excelledsoftware will become famous soon enough
Default

RFoudy,

I have the procedure written now and it works. However one thing that will make it more complex is if you have groups that need the line colors changed. It can certainly be done but I would need to debug it a little bit. Right now I have skipping over groups and it worked 100% for the sample you sent me. Let me know if this is not an issue and if it isnt I will post it with some explanations and you will be all set.


EDIT

I will post it now and if you want we can go over it
Code:
Sub ChangeLineColor()

  Dim sld As Slide, shp As Shape, GrayColor(1 To 2) As Long, Arr As Byte
  Dim CheckColor As Long
  
    'Set GrayColors
    GrayColor(1) = 10921638
    GrayColor(2) = 12287562
  

    For Each sld In ActivePresentation.Slides
      sld.Select 'not necessary but fun to watch
      Debug.Print sld.SlideIndex 'again not necessary but useful if errors
        For Each shp In sld.Shapes
          If shp.Type <> msoGroup Then
            shp.Select 'not necessary but fun to watch
            CheckColor = shp.Line.ForeColor.RGB
            For Arr = 1 To 2
              If GrayColor(Arr) = CheckColor Then
                shp.Line.ForeColor.RGB = 12287562 'Change to blue
              End If
            Next Arr     
          End If
        Next shp
      Next sld
  MsgBox "done"

End Sub
Let me know if that works. As with all code be sure to back up your work before running it because you cannot undo a macro.
Reply With Quote