I recorded a macro for a CYAN FILL.... its like this
Sub F_Cyan() Dim OrigSelection As ShapeRange Set OrigSelection = ActiveSelectionRange OrigSelection(1).Style.StringAssign "{""transparency"":{},""outline"":{""width"":""1764"",""color"":""CMYK,USER,0,0,0,100,100,00000000-0000-0000-0000-000000000000""},""fill"":{""type"":""1"",""primaryColor"":""CMYK100,USER,255,0,0,0,100,00000000-0000-0000-0000-000000000000"",""secondaryColor"":""CMYK,USER,0,0,0,0,100,00000000-0000-0000-0000-000000000000""}}"End Sub
...
anyone can make this into smaller easy to understand, like I want to copy that text and paste for magenta and for yellow....etc, similarly also for outline
regards
sriram
The StringAssignment is one option (I'm also not familiar with) to modify the layout of shapes. For default actions like changing the fill of a shape you also may use ActiveShape.Fill.ApplyUniformFill CreateCMYColor(100, 100, 0)
Sub F_Magenta() Set OrigSelection = ActiveSelectionRange ActiveShape.Fill.ApplyUniformFill CreateCMYKColor(0, 100, 0, 0)End Sub
when i have selected elements and applied the above macro, only one eleement is magentra colored, rest is not effecting. please correct the macro. pleaseeeeeeeeeeeeee
Sorry, I assumed basic VBA knowledge:
Sub F_Magenta()Dim Sh As ShapeFor Each Sh In ActiveSelectionRange.Shapes Sh.Fill.ApplyUniformFill CreateCMYKColor(0, 100, 0, 0)Next ShEnd Sub
Here you can get tips how to solve a particular problem to make your entire solution!
Thank Q so much
Can you please help similarly for outline color
Sub F_Magenta()Dim Sh As ShapeFor Each Sh In ActiveSelectionRange.Shapes Sh.Fill.setoutline properties CreateCMYKColor(0, 100, 0, 0)Next ShEnd Sub