Hi, am I stupid or this a new bug: I just cannot get hold of the text places in my ppt template. This is the code I use:
Dim slides As Slides = pptPresentation.Slides
For slideIndex = 0 To slides.Count - 1
Dim pholders As Placeholders = slides(slideIndex).Placeholders
For i = 0 To pholders.Count - 1
Dim th As TextHolder
If TypeOf pholders(i) Is TextHolder Then
th = CType(pholders(i), TextHolder)
Else
th = Nothing
End If
If Not th Is Nothing Then
If th.Text = "TH1" Then
If groupText <> "" Then
th.Paragraphs(0).Portions(0).Text = aText
Else
th.Paragraphs(0).Portions(0).Text = bText
End If
End If
If th.Text = "TH2" Then
th.Paragraphs(0).Portions(0).Text = cText
End If
End If
Next
Dim Shapes As Shapes = slides(slideIndex).Shapes
For i = 0 To Shapes.Count - 1
Dim tf As TextFrame
If TypeOf Shapes(i) Is TextFrame Then
tf = CType(Shapes(i), TextFrame)
Else
tf = Nothing
End If
If Not tf Is Nothing Then
If tf.Text = "TH1" Then
If groupText <> "" Then
tf.Paragraphs(0).Portions(0).Text = groupText
Else
tf.Paragraphs(0).Portions(0).Text = questionText
End If
End If
If tf.Text = "TH2" Then
tf.Paragraphs(0).Portions(0).Text = HttpContext.Current.Session("QuestionnaireName")
End If
End If
Next
Next
Is there any documentation on the objects and their PPT equals and how these should be used with simple examples?
r. BA