Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    Jan 2001
    Location
    San Diego, California, USA
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Remove Speaker Notes (PPT2000 SR1)

    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?

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Remove Speaker Notes (PPT2000 SR1)

    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:
    <pre>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</pre>

    Finally came up with this:
    <pre>Sub NotesPurge()
    Dim aSlide As Slide
    For Each aSlide In ActivePresentation.Slides
    aSlide.NotesPage.Shapes(2).TextFrame.TextRange.Tex t = vbNullString
    Next
    End Sub</pre>

    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.

  3. #3
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Remove Speaker Notes (PPT2000 SR1)

    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
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  4. #4
    Lounger
    Join Date
    Jan 2001
    Location
    San Diego, California, USA
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Remove Speaker Notes (PPT2000 SR1)

    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. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    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.Tex t = 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
    -----------------------------------------------------

  5. #5
    Lounger
    Join Date
    Jan 2001
    Location
    San Diego, California, USA
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Remove Speaker Notes (PPT2000 SR1)

    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.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •