Red2034
10-30-2007, 04:37 PM
Sub Loop()
Dim x As Long
Dim y As Long
Dim i As Integer
Dim objText As Object
For x = 3 To ActivePresentation.Slides.Count
For y = 1 To ActivePresentation.Slides(x).Shapes.Count
For i = 1 To 15
If ActivePresentation.Slides(x).Shapes(y).Type = msoOLEControlObject Then
Set objTxt = ActivePresentation.Slides(x).Shapes(y).OLEFormat.Object
If objTxt.Name = "PageTitle" Then
MsgBox objTxt.Name + " = " + objTxt.Text
End If
Slide115.TOCpagetitle(i).Value = objTxt.Text 'this is where i am getting the error "Method or data member not found" during the second loop thru, am I using the (i) correctlly???? each time thru it shoud add +1 to i (right??)
Set objTxt = Nothing
End If
Next i
Next y
Next x
End Sub
Dim x As Long
Dim y As Long
Dim i As Integer
Dim objText As Object
For x = 3 To ActivePresentation.Slides.Count
For y = 1 To ActivePresentation.Slides(x).Shapes.Count
For i = 1 To 15
If ActivePresentation.Slides(x).Shapes(y).Type = msoOLEControlObject Then
Set objTxt = ActivePresentation.Slides(x).Shapes(y).OLEFormat.Object
If objTxt.Name = "PageTitle" Then
MsgBox objTxt.Name + " = " + objTxt.Text
End If
Slide115.TOCpagetitle(i).Value = objTxt.Text 'this is where i am getting the error "Method or data member not found" during the second loop thru, am I using the (i) correctlly???? each time thru it shoud add +1 to i (right??)
Set objTxt = Nothing
End If
Next i
Next y
Next x
End Sub