How can I divide a shapes outline width in half (/2) using vba?
I have a code for increasing by point size. Can change "+ 1" to "/ 2". Done here:
Sub OutlineDiv2()Dim s As Shape For Each s In ActiveSelectionRange With s.Outline .Width = .Width / 2 End With Next sEnd Sub
Nevermind, not gonna work for what I needed.
Myron said:How can I divide a shapes outline width in half (/2) using vba?
Look at Shape.Outline.Width.
So, something like s.Outline.Width = s.Outline.Width/2
If you look at the Object Properties docker, you can see that, when you do that, it is increasing the Outline Width, but also changing the Stretch and Tilt of the nib to get the vertical lines to render at the original outline width. Stretch does not go larger than 100%, so it does it that way.
After you have done that, I don't think the shape has any "memory" of what its old outline width used to be.
If you try going the other way - stretching that rectangle to make it narrower - then you can see that it keeps Outline.Width the same, but changes Stretch and Tilt of the nib to get the thinner vertical lines.