-
Hi and welcome to VBAX 
All you need to do here is use a variable for the row index and run the same code twice (to set the properties) with a For... Next loop - checking which row you are on and setting the Text appropriately.
Here's the code, which adds a table on the current slide[VBA]Dim shpGrpTable As Shape
Dim intRowindex As Integer
Set shpGrpTable = ActivePresentation.Slides(ActiveWindow.View.Slide.SlideIndex).Shapes _
.AddTable(3, 6, 20, 100, 680, 400)
For intRowindex = 1 To 2
With shpGrpTable.Table.Cell(intRowindex, 1).Shape.TextFrame
Select Case intRowindex
Case 1
.TextRange.Text = "GROUP"
Case 2
.TextRange.Text = "COLUMN"
End Select
.TextRange.Font.Size = 14
.TextRange.Font.Name = "Arial"
.TextRange.Font.Color.RGB = 16777215
.TextRange.Font.Bold = msoTrue
.HorizontalAnchor = msoAnchorCenter
.VerticalAnchor = 3
End With
Next intRowindex[/VBA]
You you could use another loop for the slide index if you specifically want to add the table to sildes 1 and 2
e.g:
[VBA]For intSlideIndex = 1 To 2
Set shpGrpTable = ActivePresentation.Slides(intSlideIndex).Shapes.AddTable(3, 6, 20, 100, 680, 400)
'etc...etc...
Next intSlideIndex[/VBA]
K :-)

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules