The Rev
Registered User.
- Local time
- Today, 13:55
- Joined
- Jan 15, 2003
- Messages
- 119
Good morning,
I have a PowerPoint slide that has a table as one of the elements on the slide. I need to select the table and then replace the string "<Co Name>" with my stored variable of CompanyName. I don't know how to call the table and loop through the table cells for that string. Here's what I have thus far that doesn't seem to be working...
I have a PowerPoint slide that has a table as one of the elements on the slide. I need to select the table and then replace the string "<Co Name>" with my stored variable of CompanyName. I don't know how to call the table and loop through the table cells for that string. Here's what I have thus far that doesn't seem to be working...
Code:
Set CurSlide = objPresentation.Slides(13).Select()
Dim t As Table
Dim tRow As Long, iCol As Long
Dim tText As TextRange
Dim tTemp As TextRange
With t
For tRow = 1 To .Rows.Count
For tCol = 1 To .Columns.Count
Set tText = .Cell(tRow, tCol).Shape.TextFrame.TextRange
Do
Set tTemp = tText.Replace("<Co Name>", CompanyName, , WholeWords, MatchCase)
Loop While Not tTemp Is Nothing
Next tCol
Next tRow
End With