Thank you both Steve and Shyam:
Yup, the plot thickens as complexity increases
The problem I see with your examples is that you are able to detect all
selected cells and handle them individually. This is OK if you want to,
let's say, modify background color, but I think there's an issue if you want
to surround the entire selection with borders (using the examples the
borders in the middle of the selected cells would also be set, and not only
the countour of the selection (or have I lost it...)
Shyam, I've been testing your second example and all I get is "The specified
value is out of range" on line "With .GroupItems.Range(CellArray).Fill"
[I've created an 8x4 table and selected two cells)
Again, thanks to you both for your inputs - there's much to lear about
tables in PPT!
Rgds, JS
But I think I have a nastier issue, I need to surround two or more
adjacent
cells (TextRange fails when selecting 2+ cells), do you have any ideas on
how to go about this?
Yes, and thanks for asking. I've added an example to:
Working with PowerPoint tables
http://www.pptfaq.com/FAQ00790.htm
Short version:
If ActiveWindow.Selection.Type is ppSelectionShape, test to see if
Selection.ShapeRange(1).Type is 19 (table).
If so, iterate through the table's cells collection, testing each cell to
see
if its .Selected property is True. If so, it's a selected table cell.
Format
that sukkah.
Again thanks for your help!
Rgds, JS
Hi All:
I'm trying to write a VBA macro that will set all 4 borders around a
cell
in
a PPT table that is selected with a certain border color and line
thickness.
I've tried to record a macro when doin this manually but the recorded
macro
is empty!!! I've looked on VBA help but I don't seem to find how to
capture
teh selected cells and how to assing the border (I usually get help
from
a
recorded macro...).
This should help:
Working with PowerPoint tables
http://www.pptfaq.com/FAQ00790.htm
Don't expect your Works-Perfectly-In-2003 table code to work in
PowerPoint
2007, though. Tables+2007+VBA = BadlyBroken
==============================
PPT Frequently Asked Questions
http://www.pptfaq.com/
PPTools add-ins for PowerPoint
http://www.pptools.com/
==============================
PPT Frequently Asked Questions
http://www.pptfaq.com/
PPTools add-ins for PowerPoint
http://www.pptools.com/