Need script to find and replace line sizes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My presentation standards require that lines be a minimum of 2 points. Is
there a script I can use that says if less than 2 points, make two points,
leaving all other aspects of the line the same? If not, most of my
troublesome lines are at .75 point, if I could get a script that would
replace a .75 line width with a 2.0 line width that'd be great.

I imagine it'd be similar to the one that was done for making lines have a
height or width of zero, so they'd be straight horizontal or vertical, but
using line width instead..but I don't know enough about scripts/macros to
figure it out.

Thanks so much!
 
Try this:

Sub LineWeight()

Dim oSld As Slide
Dim oShp As Shape

For Each oSld In ActivePresentation.Slides
For Each oShp In oSld.Shapes
If oShp.Line.Weight < 2 Then
oShp.Line.Weight = 2
End If

Next oShp
Next oSld
End Sub
--
 
It came real close. If possible, I need a way to exclude lines that are
within groups. OTOH, I can see real easily when a wrong icon has been used.
If a grouped icon was used instead of the provided icon, it looks funny and I
can really easily see it! So it does help in that way too.

A second question - is there a way to do something similar with aspect
ratios? If they're not equal, set width equal to height? I've got a lot of
things 25% tall and 45% wide. I know there's more possible problems with this
one, but just wondering.

Thanks!
 
OK

Ask the question > get answer > change the rules!

Sub LineWeight()

Dim oSld As Slide
Dim oShp As Shape

For Each oSld In ActivePresentation.Slides
For Each oShp In oSld.Shapes
If oShp.Type <> msoGroup Then
If oShp.Line.Weight < 2 Then
oShp.Line.Weight = 2
End If
End If
Next oShp
Next oSld
End Sub

--
-----------------------------------------
Did that help?
_____________________________
John Wilson
Microsoft Certified Office Specialist
 
PS for the other problem you would need to adapt the above using oshp.Height
and oshp.Width

ie If oshp.Height <> oshp.Width Then ....
--
-----------------------------------------
Did that help?
_____________________________
John Wilson
Microsoft Certified Office Specialist
 
Back
Top