Sub RemoveTransparencyFromOutlines2() For i = 1 To shapes.count With shapes(i) If .Outline.Transparency > 0 Then .Outline.Transparency = 0 End If End With Next iEnd Sub
This is not working, Please someone help
The outline in CoreDraw dont have a transparency parameter. End of macro.
but we have 2 options while using the transparency tool.... fill or outline or both
hmmm? Try this
Sub RemoveOutlineTransparencies()Dim sr As ShapeRange, sh As Shape Set sr = ActivePage.Shapes.AllFor Each sh In srsh.Transparency.ApplyNoTransparency
Next sh
End Sub
sir it should remove only the outline transparency. it is removing the fill transparency also
Thanks goes to Shelby Moore
Sub RemoveOutlineTransparencies() Dim sr As ShapeRange, sh As Shape Set sr = ActivePage.Shapes.All For Each sh In sr sh.Transparency.AppliedTo = cdrApplyToFill Next sh
Wow, Great thought sir. but not working
pkg_sriram said:but not working
it should work, there is no other way, Shelby Moore will not give bad advice... and it’s a shame you didn’t read the Help - that’s exactly what it says there. Objects may be grouped in the document. Then try a little differentlySub TestTR()Dim s As ShapeFor Each s In ActivePage.Shapes.FindShapes(Query:="@com.transparency.type > 0") s.Transparency.AppliedTo = cdrApplyToFillNext sEnd Sub
I accept that i did not read the help, since i donot know about scripting not at all. i just try using ai, and prompt what i am looking for that's it only. i tried to run what myron sir given script, there it is asking for debug and i put the same. now i try yours.
Both work in X7. I'll have to try them at home with my 2021 version.
Myron said:Both work in X7.
For Each sh In srsh.Transparency.AppliedTo = cdrApplyToFillNext sh
if object dont have transpanrecy then ... error
Oh yeah, didn't think of that. Then your, "TestTR" macro works best.
Unless, the transparency is inside a powerclip. lol
Myron said:inside a powerclip
Shelby PowerClip search feature FindPCShapes() function as ShapeRange works fine - thank you very much