I know how to write literal text, or the contents of a string variable into the notes section of a powerpoint slide. But how can I capture the text that's in an Excel textbox in order to do the same?
If I record a macro when copying the text out of a textbox I get something like this
And here's some sample code for writing into the notes section
But I'm not sure how to make the leap to connect them...
If I record a macro when copying the text out of a textbox I get something like this
Code:
ActiveSheet.Shapes.Range(Array("NotesBox")).Select
Range("P35").Select
ActiveSheet.PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:= _
False
And here's some sample code for writing into the notes section
Code:
Sub AddNotestoPP()
Dim Sl As Slide, Sh As Shape, strNotesPageText As String
strNotesPageText = "This Text will go in the notes area"
Set Sl = ActivePresentation.Slides(1)
[COLOR=green][B]'~~> If no shapes to take Notes then add a shape first[/B][/COLOR]
If Sl.NotesPage.Shapes.Count = 0 Then
Sl.NotesPage.Shapes.AddShape msoShapeRectangle, 0, 0, 0, 0
Sh = Sl.NotesPage.Shapes(1)
Sh.TextFrame.TextRange.Text = strNotesPageText
[COLOR=green][B]'~~> If the ppt has shapes then see if they take text[/B][/COLOR]
Else
For Each Sh In Sl.NotesPage.Shapes
If Sh.HasTextFrame Then
Sh.TextFrame.TextRange.Text = strNotesPageText
Exit For
End If
Next Sh
End If
End Sub
But I'm not sure how to make the leap to connect them...