Macro to have Word Outlines import levels into the Speaker Notes Section of PowerPoint.

Below is Bill Dillworths Macro to have Word Outlines import levels into the Speaker Notes Section of PowerPoint.

 

Sub OutlineLevel2Notes()

‘Set up the integer variables we’ll be using for the macro
Dim varSlideNum As Integer
Dim varLineNum As Integer
Dim varOutlineLevel As Integer

‘This variable determines the outline level that will be _
moved from the textbox section to the notes section of PowerPoint

varOutlineLevel = 6

‘Begin the assumed prefix
With ActivePresentation

     ‘We will need to cycle thru each slide
     For varSlideNum = 1 To .Slides.Count

     ‘Add to the assumed prefix
     With .Slides(varSlideNum).Shapes.Placeholders(2)

          ‘Check if there is a text frame, if not, then there really _
isn’t any point in looking at this slide any longer

          If .HasTextFrame Then

               ‘Since there is a text frame, add to the assumed prefix
               With .TextFrame.TextRange

                    Now we will need to loop thru the lines of text _
within the placeholder textbox, but we will go backwards

                    For varLineNum = .Lines.Count To 1 Step -1

                              ‘If this line is one that should be in the notes section …
                              If .Lines(varLineNum).IndentLevel > (varOutlineLevel – 2) Then

                                   ‘… then put it there …
                                   ActivePresentation.Slides(varSlideNum) _
                                   .NotesPage.Shapes(2) _
                                   .TextFrame.TextRange.Text = _
                                   .Lines(varLineNum).Text & vbCr & _
                                   ActivePresentation.Slides(varSlideNum) _
                                   .NotesPage.Shapes(2) _
                                   .TextFrame.TextRange.Text

                                   ‘… and get rid of the text in the texbox
                                   .Lines(varLineNum).Text = “”

                                   ‘End of check on outline level
                                   End If

                              ‘Proceed to the next slide, if there is one.
                             Next varLineNum

                         ‘Stop this level of the assumed prefix
                         End With

                    ‘Done checking if there is a textframe
                    End If

               ‘Stop this level of the assumed prefix
               End With

          ‘Proceed to the next slide
          Next varSlideNum

     ‘Terminate the last level of the assumed prefix
     End With

‘Terminate the Macro

End Sub

Leave a Reply

Your email address will not be published. Required fields are marked *