Gridlines?

M

Michael Rooz

PP 2001 Mac

Greetings all:

I've noticed that in creating a .25" grid in PP, I am prevented from
'gridding' out the entire slide. I do have a .5" grid throughout the slide
but when I attempted to tighten it up I was only allowed to option/drag so
many new gridlines into place before it stopped drawing them. Has anyone
else experienced this? Nearly the whole top half of the slide now has .25"
grid but the bottom only has .5".

Oh, and while I'm on the subject . . . Is there any way to change
orientation of the ruler? For instance, I would love the left vertical ruler
to start with Zero at the top. And the top ruler to start with Zero at the
left. I know PP isn't a page layout program but this would be very helpful
to me (why does it's grid center the way it does?). Thanks much.

Michael
 
S

Steve Rindsberg

PP 2001 Mac

Greetings all:

I've noticed that in creating a .25" grid in PP, I am prevented from
'gridding' out the entire slide. I do have a .5" grid throughout the slide
but when I attempted to tighten it up I was only allowed to option/drag so
many new gridlines into place before it stopped drawing them. Has anyone
else experienced this? Nearly the whole top half of the slide now has .25"
grid but the bottom only has .5".

There seems to be a limit of 20 gridlines.
Don't complain too bitterly ... when you try the same thing on a PC, you get a
max of 8! ;-)
Oh, and while I'm on the subject . . . Is there any way to change
orientation of the ruler? For instance, I would love the left vertical ruler
to start with Zero at the top. And the top ruler to start with Zero at the
left.

No, afraid not. It'd be SO handy, wouldn't it?
Hmm. I wonder if there'd be much use for a little addin that lets you enter
the position of a shape relative to the top/left of a slide.

Why does it work the way it does in PPT?

Because.

Or maybe it's "Because it doesn't work the other way"?

Dunno, really.


================================================
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 
M

Michael Rooz

Hi Steve. Thanks for the low-down. You've saved me hours searching for a
'means'. I did hit upon a clunky sort of work-around for the grid issue.
Let's say I want my gridlines to be a quarter inch apart from one another. I
simply draw a box that is .25" high and repeat across the slide and down the
slide. Like I said, it's clunky but it helps me to get things aligned. Now
if I could only lock these boxes down until I'm through with them and want
to delete them! Being able to lock things down plus the ruler option would
be very nice indeed.

Thanks again Steve.

Michael
 
S

Steve Rindsberg

Hi Steve. Thanks for the low-down. You've saved me hours searching for a
'means'. I did hit upon a clunky sort of work-around for the grid issue.
Let's say I want my gridlines to be a quarter inch apart from one another. I
simply draw a box that is .25" high and repeat across the slide and down the
slide. Like I said, it's clunky but it helps me to get things aligned. Now
if I could only lock these boxes down until I'm through with them and want
to delete them! Being able to lock things down plus the ruler option would
be very nice indeed.

Well. Indeed, let's say you want .25" spaced gridding. Try this on for size:
The ToggleGrid macro will toggle light gray grids on and off, per slide.

You can change the spacing and color if you like.

Option Explicit
' Edit these two values to change the grid spacing in inches
Const dVspacing As Double = 0.25
Const dHspacing As Double = 0.25
' Edit these three values to change the RGB color of the grid lines
Const lGridColorRed As Long = 225
Const lGridColorGreen As Long = 225
Const lGridColorblue As Long = 225

Sub ToggleGrid()
If Len(ActiveWindow.Selection.SlideRange(1).Tags("GRIDDED")) > 0 Then
Call RemoveGrid
Else
Call CreateGrid
End If
End Sub
Function CreateGrid()
' Creates gridlines
' Edit the values below to change spacing and color

Dim oSh As Shape
Dim oSl As Slide
Dim x As Double

Dim dBeginX As Double
Dim dBeginY As Double
Dim dEndX As Double
Dim dEndY As Double

' these hold dVspacing and dHspacing converted to points
Dim dVspace As Double
Dim dHspace As Double

dVspace = dVspacing * 72
dHspace = dHspacing * 72

dBeginX = 0
dBeginY = 0
dEndX = ActivePresentation.PageSetup.SlideWidth
dEndY = ActivePresentation.PageSetup.SlideHeight

Set oSl = ActiveWindow.Selection.SlideRange(1)
With oSl
' add vertical gridlines
For dBeginX = 0 To ActivePresentation.PageSetup.SlideWidth
Set oSh = oSl.Shapes.AddLine(dBeginX, dBeginY, dBeginX, dEndY)
With oSh
' Change RGB value here:
.Line.ForeColor.RGB = RGB(lGridColorRed, lGridColorGreen,
lGridColorblue)
Call .Tags.Add("GRIDLINE", "YES")
End With
dBeginX = dBeginX + dHspace
Next
' add horizontal gridlines
dBeginX = 0
dBeginY = 0
For dBeginY = 0 To ActivePresentation.PageSetup.SlideHeight
Set oSh = oSl.Shapes.AddLine(dBeginX, dBeginY, dEndX, dBeginY)
With oSh
' Change RGB value here:
.Line.ForeColor.RGB = RGB(225, 225, 225)
Call .Tags.Add("GRIDLINE", "YES")
End With
dBeginY = dBeginY + dVspace
Next
' Mark the slide so we know that it's gridded
Call .Tags.Add("GRIDDED", "YES")
End With

End Function

Function RemoveGrid()
Dim oSh As Shape
Dim x As Long
For x = ActiveWindow.Selection.SlideRange(1).Shapes.Count To 1 Step -1
Set oSh = ActiveWindow.Selection.SlideRange(1).Shapes(x)
If Len(oSh.Tags("GRIDLINE")) > 0 Then
oSh.Delete
End If
Next
' Mark the slide so we know that it's gridded
ActiveWindow.Selection.SlideRange(1).Tags.Delete ("GRIDDED")

End Function


================================================
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 
M

Michael Rooz

Steve, Steve, Steve, really now. I'm still working on getting my GED! Just
kidding.

I will save that last post and on the day I grow a new head perhaps it will
make sense to me, but let me ask you ---- is it something I can simply cut
and paste into something else. I'm a one button kind of boy.

I'm guessing its Visual Basic, which I don't know (but am curious about).
I'll save it. Thanks.

Michael
 
S

Steve Rindsberg

Steve, Steve, Steve, really now. I'm still working on getting my GED! Just
kidding.

And would you believe that they used to describe VB as having English-like
syntax? Relative to the other languages of the day, maybe. But that's like
saying a 500 pound boulder has gravel-like syntax (relative to the other paving
materials of the day). Sucker's still too heavy to lift, dontcha know.
I will save that last post and on the day I grow a new head perhaps it will
make sense to me, but let me ask you ---- is it something I can simply cut
and paste into something else. I'm a one button kind of boy.

I'm guessing its Visual Basic, which I don't know (but am curious about).
I'll save it. Thanks.

It is. Sorry to have tossed that past your ears w/o adequate warning. ;-)

This is a bit WinCentric, but it should work for MacPPT versions as well:

How do I use VBA code in PowerPoint?
http://www.rdpslides.com/pptfaq/FAQ00033.htm

================================================
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 

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