PDA

View Full Version : Solved: Removing a table's Outline border



TrippyTom
07-10-2006, 04:41 PM
I've been searching all throughout PowerPoints VBA library to figure out a simple way to just remove the OUTLINE of an entire table (so there are no lines on the outside).

I thought maybe I could make the outer lines white (since I have a white background) via For/Next loops, but that's not really what I would prefer. I would like to remove the line entirely.

Does anyone happen to know how to do this?

-- Also, while I'm here, how do i set table margins with code?

What's a good place (besides the object browser) to get this kind of info for Powerpoint VBA? I don't like bothering you guys with these simple questions; I feel unworthy. :bow:

Thanks,
TT

Andy Pope
07-11-2006, 04:18 AM
To remove the outside border try

Dim tblTemp As Table

Set tblTemp = ActivePresentation.Slides(1).Shapes(3).Table
With tblTemp
.Rows(1).Cells.Borders.Item(ppBorderTop).Visible = msoFalse
.Rows(.Rows.Count).Cells.Borders.Item(ppBorderBottom).Visible = msoFalse
.Columns(1).Cells.Borders.Item(ppBorderLeft).Visible = msoFalse
.Columns(.Columns.Count).Cells.Borders.Item(ppBorderRight).Visible = msoFalse
End With

Adjust slide and shape index to suit your presentation

TrippyTom
07-11-2006, 09:06 AM
Thanks very much Andy.
:beerchug:

p.s. I figured out my question to the margins. I made a shape and set the margins on that, then told it to be the default settings. Now when I run my macro it uses the default settings and makes the margins how I want them. :)

Thanks for all your help; I'm at a loss when it comes to PowerPoint macros because I don't think the IT guy installed all the help files (either that or the macro recorder needs some serious help!)

MOS MASTER
07-11-2006, 10:48 AM
I don't think the IT guy installed all the help files (either that or the macro recorder needs some serious help!)

No and Yes! :yes

Powerpoint is one of the poorest versions supported in terms of VBA. There are a lot less objects, collections, properties, etc. to play with. And indeed the recorder is very poor. :( (but that's just the way it is.)

Consider the fact that Outlook doesn't even have a Macro-recorder... So it's better to have a bad one at least pointing you to the right objects then having none at all! (Outlook does have a decent help file btw)

HTH.
</IMG></IMG>