Hi,
This is a PowerPoint question. I need to scan through each slide in a presentation to see if each slide contains textbox25. If it's not there, then I need to insert a textbox, and then insert a particular value. I haven't had much success with my codes, any suggestions?
For Each Slide In Application.ActivePresenation.Slides
For i = 1 To Slide.Count
refbox = "Text Box 25"
If ActivePresentation.Slides.Item(1).Shapes.Item(refbox) Is Nothing Then
ActiveWindow.Selection.SlideRange.Shapes.AddTextbox(msoTextOrientationHorizontal, 0, 0, 42, 36).Select
TextBox.name = refbox
ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Characters(Start:=1, Length:=0).Select
With ActiveWindow.Selection.TextRange
.Text = i
With .Font
.name = "Arial"
.Size = 9
.Color.SchemeColor = ppForeground
End With
End With
ActiveWindow.Selection.Unselect
Thank you!! ray:
This is a PowerPoint question. I need to scan through each slide in a presentation to see if each slide contains textbox25. If it's not there, then I need to insert a textbox, and then insert a particular value. I haven't had much success with my codes, any suggestions?
For Each Slide In Application.ActivePresenation.Slides
For i = 1 To Slide.Count
refbox = "Text Box 25"
If ActivePresentation.Slides.Item(1).Shapes.Item(refbox) Is Nothing Then
ActiveWindow.Selection.SlideRange.Shapes.AddTextbox(msoTextOrientationHorizontal, 0, 0, 42, 36).Select
TextBox.name = refbox
ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Characters(Start:=1, Length:=0).Select
With ActiveWindow.Selection.TextRange
.Text = i
With .Font
.name = "Arial"
.Size = 9
.Color.SchemeColor = ppForeground
End With
End With
ActiveWindow.Selection.Unselect
Thank you!! ray: