Prev: Why is Close Group option greyed out?
Next: IE8 converts ppsx and pptx files to zip files FF does not
From: Clifton Ivey on 13 Dec 2009 21:01 I have a table I added via VBA like this: set oTable = ActivePresentation.Slides("mySlide").Shapes.AddTable(...) I then add some cells to it by: oTable.Cell(...).Shape.TextFrame.TextRange.Text = "some text" However, I cannot get a handle on these cells to update the font, fill, etc. What is the best way to do this?
From: Steve Rindsberg on 13 Dec 2009 22:29 On Sun, 13 Dec 2009 21:01:01 -0500, Clifton Ivey <clifton ivey <"africom.mil>"> wrote: > I have a table I added via VBA like this: > > set oTable = ActivePresentation.Slides("mySlide").Shapes.AddTable(...) > > I then add some cells to it by: > > oTable.Cell(...).Shape.TextFrame.TextRange.Text = "some text" > > However, I cannot get a handle on these cells to update the font, fill, > etc. > > What is the best way to do this? oTable.Cell(x,y).Shape gives you a reference to the shape that represents the cell. You can format it using the same properties as you would any other shape. -- ================================ Steve Rindsberg PPTools add-ins for PowerPoint http://www.pptools.com The PowerPoint FAQ http://www.pptfaq.com
From: Clifton Ivey on 13 Dec 2009 23:48 Is there any way to modify them as a group? As opposed to modifying each individual cell. "Steve Rindsberg" wrote: > On Sun, 13 Dec 2009 21:01:01 -0500, Clifton Ivey <clifton ivey > <"africom.mil>"> wrote: > > > I have a table I added via VBA like this: > > > > set oTable = ActivePresentation.Slides("mySlide").Shapes.AddTable(...) > > > > I then add some cells to it by: > > > > oTable.Cell(...).Shape.TextFrame.TextRange.Text = "some text" > > > > However, I cannot get a handle on these cells to update the font, fill, > > etc. > > > > What is the best way to do this? > > oTable.Cell(x,y).Shape gives you a reference to the shape that represents > the cell. > You can format it using the same properties as you would any other shape. > > > > > -- > ================================ > Steve Rindsberg > PPTools add-ins for PowerPoint > http://www.pptools.com > The PowerPoint FAQ > http://www.pptfaq.com > . >
From: Steve Rindsberg on 14 Dec 2009 11:16 In article <D9EA683C-6021-433D-9C87-5944B0DD9524(a)microsoft.com>, Clifton Ivey wrote: > Is there any way to modify them as a group? As opposed to modifying each > individual cell. If you find a way, I'd love to hear of it. Somebody please! Expose my ignorance. ;-) Cell by cell is the only way I'm aware of. And man, is it ever SLOW. One trick though: add as few rows/columns as you can to start, format them, then add rows and colums as needed. MUCH faster than adding them first then formatting. > > "Steve Rindsberg" wrote: > > > On Sun, 13 Dec 2009 21:01:01 -0500, Clifton Ivey <clifton ivey > > <"africom.mil>"> wrote: > > > > > I have a table I added via VBA like this: > > > > > > set oTable = ActivePresentation.Slides("mySlide").Shapes.AddTable(...) > > > > > > I then add some cells to it by: > > > > > > oTable.Cell(...).Shape.TextFrame.TextRange.Text = "some text" > > > > > > However, I cannot get a handle on these cells to update the font, fill, > > > etc. > > > > > > What is the best way to do this? > > > > oTable.Cell(x,y).Shape gives you a reference to the shape that represents > > the cell. > > You can format it using the same properties as you would any other shape. > > > > > > > > > > -- > > ================================ > > Steve Rindsberg > > PPTools add-ins for PowerPoint > > http://www.pptools.com > > The PowerPoint FAQ > > http://www.pptfaq.com > > . > > ============================== PPT Frequently Asked Questions http://www.pptfaq.com/ PPTools add-ins for PowerPoint http://www.pptools.com/
From: Clifton Ivey on 19 Dec 2009 07:48 Thanks Steve. I am afraid you are correct and there is no simple way to do what I want, but I had been led to believe from researching this that it may be possible to interact with the cells in a table as a ShapeRange. I even found a couple of examples, but couldn't get them to work. The code I've tried looks like this: With oSlide.Shapes.Range("myTablesName") With .Fill .Visible=True .BackColor.SchemeColor = ppShadow End With With .TextFrame.TextRange.Font .Italic = msoTrue .Color.RGB = RGB(125, 0, 125) End With End With ======== end code ============ From what I've read I thought the cells are shapes embedded in the table which is also a shape. So why can't I get a handle on it as a Range? Thanks again, Brian "Steve Rindsberg" wrote: > In article <D9EA683C-6021-433D-9C87-5944B0DD9524(a)microsoft.com>, Clifton Ivey > wrote: > > Is there any way to modify them as a group? As opposed to modifying each > > individual cell. > > If you find a way, I'd love to hear of it. > Somebody please! Expose my ignorance. ;-) > > Cell by cell is the only way I'm aware of. > And man, is it ever SLOW. > > One trick though: add as few rows/columns as you can to start, format them, > then add rows and colums as needed. MUCH faster than adding them first then > formatting. > > > > > "Steve Rindsberg" wrote: > > > > > On Sun, 13 Dec 2009 21:01:01 -0500, Clifton Ivey <clifton ivey > > > <"africom.mil>"> wrote: > > > > > > > I have a table I added via VBA like this: > > > > > > > > set oTable = ActivePresentation.Slides("mySlide").Shapes.AddTable(...) > > > > > > > > I then add some cells to it by: > > > > > > > > oTable.Cell(...).Shape.TextFrame.TextRange.Text = "some text" > > > > > > > > However, I cannot get a handle on these cells to update the font, fill, > > > > etc. > > > > > > > > What is the best way to do this? > > > > > > oTable.Cell(x,y).Shape gives you a reference to the shape that represents > > > the cell. > > > You can format it using the same properties as you would any other shape. > > > > > > > > > > > > > > > -- > > > ================================ > > > Steve Rindsberg > > > PPTools add-ins for PowerPoint > > > http://www.pptools.com > > > The PowerPoint FAQ > > > http://www.pptfaq.com > > > . > > > > > > ============================== > PPT Frequently Asked Questions > http://www.pptfaq.com/ > > PPTools add-ins for PowerPoint > http://www.pptools.com/ > > > . >
|
Next
|
Last
Pages: 1 2 Prev: Why is Close Group option greyed out? Next: IE8 converts ppsx and pptx files to zip files FF does not |