force already-drawn lines to be "straight" (perpendicular)

B

bdyscr33t

*sigh* - is there ANY way to make sure that all the lines / arrows within a
presentation (or even a single slide) are perfectly up/down or right/left
without redrawing them all?

They look OK, but when I go to print or .pdf them they're off by like one
pixel (not all.. just some).

Let me know if you have any ideas or tools or whatever :)

Thanks in advance!
 
G

Glen Millar

Hi,

That's a good question! I mucked around with placement options but I think
you may have to resort to vba. I know you can resize images all sorts of
ways but lines may be tricky. They have vector placement but not boundaries.

Maybe run to the window and holler: "STEVE". Or "Shyam" or Bill plural". Or
Someone".

By the way, as a tip. Turn on the grid and snap to grid when you draw them .
It will draw straight lines in ways you may not believe.

--
Regards,

Glen Millar
Microsoft PPT MVP
www.powerpointworkbench.com

Australia
 
B

Bill Dilworth

You could use VBA to automate this process, but if you already know which
lines, just ...

Select the line, then right click and format AutoShape.
Select the Size tab and change the Height: to 0

Otherwise:

-----Begin Code-----

Sub Gibraltar()
Dim oSld As Slide
Dim oShp As Shape

For Each oSld In ActivePresentation.Slides
For Each oShp In oSld.Shapes
If oShp.Type = msoLine Then
If oShp.Height > oShp.Width Then
oShp.Width = 0
Else
oShp.Height = 0
End If
End If
Next oShp
Next oSld
End Sub

-----End Code-----

This will force all lines to be either 100% vertical or 100% horizontal.


Bill Dilworth
Microsoft PPT MVP Team
Users helping fellow users.
===============
Please spend a few minutes checking vestprog2@
out www.pptfaq.com This link will yahoo.
answer most of our questions, before com
you think to ask them.

Change org to com to defuse anti-spam,
ant-virus, anti-nuisance misdirection.
..
..
 
S

Shyam Pillai

Try:
Sub StraightenLines()
Dim oShp As Shape
Dim oSld As Slide
For Each oSld In ActivePresentation.Slides
For Each oShp In ActivePresentation.Slides(1).Shapes
If oShp.Type = msoLine Then
If oShp.Height > oShp.Width Then
oShp.Width = 0
End If
If oShp.Height < oShp.Width Then
oShp.Height = 0
End If
End If
Next oShp
Next oSld
End Sub
 
B

bdyscr33t

THANK YOU BILL! (You too, Shyam!)

I thought for SURE this wouldn't be as easy as you made it!...
Really appreciate it.

(Now... to come up with something more challenging... hahhaha)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top