• Remove Speaker Notes (PPT2000 SR1)

    Author
    Topic
    #371886

    I frequently have to remove speaker notes from presentations and it just occurred to me that a macro could probably do this faster than manual removal.

    Can anyone give me a direction to start for how to do this?

    Viewing 0 reply threads
    Author
    Replies
    • #592592

      I went into the online help for what appeared to be most relevant, the NotesPage property of the Slide object, but it led to a morass, since it returns a SlideRange which I don’t really understand. To find a property I could change, I added a note to my first slide and used this code:

      Sub NotesExploration()
      Dim aSlide As Slide, sldrng As SlideRange
      For Each aSlide In ActivePresentation.Slides
          Set sldrng = aSlide.NotesPage
          Stop  'Now open View|Locals and examine the properties under the sldrng object
      Next
      End Sub

      Finally came up with this:

      Sub NotesPurge()
      Dim aSlide As Slide
      For Each aSlide In ActivePresentation.Slides
          aSlide.NotesPage.Shapes(2).TextFrame.TextRange.Text = vbNullString
      Next
      End Sub

      Hopefully this works consistently across presentations and configurations, ’cause I wouldn’t want to have to do the more general code to deal with the note not being in the second shape.

      • #592620

        Jefferson, the NotesPage property is a great find! Now I need to rewrite all of my macros that deal with notes. However, it seems to be tempermental. Help says, “The NotesPage property returns the notes page for either a single slide or a range of slides.” How can it return a “page” (singular) for “slides” (plural)? Turns out it can’t! The Shapes(2) has always bothered me and I wondered if there was some better way to identify the notes placeholder, so I tried to look at the ActivePresentation.Slides.Range.NotesPage.Shapes collection and got “Automation error The object invoked has disconnected from its clients.” Just the way I feel sometimes! So, I guess we must go one slide at a time. A final note: the Shapes(2) is validated by the help for the SlideRange Collection Object: “placeholder two (the notes area) on the notes page.” Would be nice to have a HasNotes property like the HasTextFrame. Anyway, thanks again for the NotesPage tip! –Sam

        • #593647

          Jefferson and Sam,

          Attached is the final NotesPurge PowerPoint Add-in. Here is the file location for a NT4 machine. I do not know where it would be for a Win98/Me/2K/XP install.
          C:WINNTProfilesusernameApplication DataMicrosoftAddIns.

      • #592886

        Wow! That’s great!!

        I have a little VB background and was so confused trying to navigate the PowerPoint macro/vb modules. I am not strong with VB logic. The second code works excellent as a macro and cleans every speaker note from every slide. smile

        I made the macro a PowerPoint Add-in and was successful at adding a new menu option to my PPT Tools menu titled “Purge Notes” and the code executed beautifully.

        Thank you for your excellent reply, this has given me an inside look to PPT VB logic.
        Below is the final VB module code for the PPA.
        I hope others can use it as well
        —————————————————–
        Sub NotesPurge()
        ‘ Notes Purge Macro created 6/6/02 by jscher2000 in Woody’s Lounge @ http://www.wopr.com
        ‘This Sub NotesPurge is excellent as a macro in PPT, all by its self
        Dim aSlide As Slide
        For Each aSlide In ActivePresentation.Slides
        aSlide.NotesPage.Shapes(2).TextFrame.TextRange.Text = vbNullString
        Next

        End Sub

        Sub Auto_Open()
        ‘Auto Open added by Ryan Woolever, using modified Microsoft online support examples http://www.microsoft.com
        ‘This adds a toolbar command called Purge Notes when Loading a PP Add-in
        Dim NewControl As CommandBarControl

        ‘ Store an object reference to a command bar.
        Dim ToolsMenu As CommandBars

        ‘ Figure out where to place the menu choice.
        Set ToolsMenu = Application.CommandBars

        ‘ Create the menu choice. The choice is created in the first
        ‘ position in the Tools menu.
        Set NewControl = ToolsMenu(“Tools”).Controls.Add _
        (Type:=msoControlButton, _
        Before:=1)

        ‘ Name the command.
        NewControl.Caption = “Purge Speaker Notes”

        ‘ Connect the menu choice to your macro. The OnAction property
        ‘ should be set to the name of your macro.
        NewControl.OnAction = “NotesPurge”

        End Sub

        Sub Auto_Close()
        ‘Auto Close added by Ryan Woolever, modified Microsoft online support examples http://www.microsoft.com

        Dim oControl As CommandBarControl
        Dim ToolsMenu As CommandBars

        ‘ Get an object reference to a command bar.
        Set ToolsMenu = Application.CommandBars

        ‘ Loop through the commands on the tools menu.
        For Each oControl In ToolsMenu(“Tools”).Controls

        ‘ Check to see whether the comand exists.
        If oControl.Caption = “Purge Speaker Notes” Then

        ‘ Check to see whether action setting is set to NotesPurge.
        If oControl.OnAction = “NotesPurge” Then

        ‘ Remove the command from the menu.
        oControl.Delete

        End If
        End If

        Next oControl

        End Sub
        —————————————————–

    Viewing 0 reply threads
    Reply To: Remove Speaker Notes (PPT2000 SR1)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: