S
sara
Here's my problem:
I take hours creating an architecture blue print/flow chart and my boss
doesn't approve some of the colors in the legend. At times there are atleast
20-30 objects with that color and it takes me AGES to change the color( to be
told that i need to change the color yet again). Its a very suboptimal way of
changing the presentation and i am figuring out how to do it using VBA:
Here is what i want to achieve( in edit or presentation mode):
1. Take input from user about which color to change (R,G,B value). I'll
store it as OldColor
2. Take input from user about which color to change to (R,G,B value). I'll
store it as NewColor
3. Find all objects on current slide whose color is OldColor and change to
NewColor
here is my broken code as of now:
"
Dim NewColor As Long
Dim OldColor As Long
Dim x, y, z As Integer
take input from user for color to change in the form of RGB into variables
x,y,z
OldColor = RGB(x, y, z)
' Take input from user for color to change to: in the form of RGB into
variables x,y,z
NewColor = RGB(x, y, z
' Select current slide.
Dim currentslide As Long
currentslide = ActiveWindow.Selection.SlideRange.SlideIndex
for all shapes in currentslide with Fill.ForeColor.RGB == OldColor
change Fill.ForeColor.RGB = NewColor
Any thoughts? suggestions
I take hours creating an architecture blue print/flow chart and my boss
doesn't approve some of the colors in the legend. At times there are atleast
20-30 objects with that color and it takes me AGES to change the color( to be
told that i need to change the color yet again). Its a very suboptimal way of
changing the presentation and i am figuring out how to do it using VBA:
Here is what i want to achieve( in edit or presentation mode):
1. Take input from user about which color to change (R,G,B value). I'll
store it as OldColor
2. Take input from user about which color to change to (R,G,B value). I'll
store it as NewColor
3. Find all objects on current slide whose color is OldColor and change to
NewColor
here is my broken code as of now:
"
Dim NewColor As Long
Dim OldColor As Long
Dim x, y, z As Integer
take input from user for color to change in the form of RGB into variables
x,y,z
OldColor = RGB(x, y, z)
' Take input from user for color to change to: in the form of RGB into
variables x,y,z
NewColor = RGB(x, y, z
' Select current slide.
Dim currentslide As Long
currentslide = ActiveWindow.Selection.SlideRange.SlideIndex
for all shapes in currentslide with Fill.ForeColor.RGB == OldColor
change Fill.ForeColor.RGB = NewColor
Any thoughts? suggestions