Consulting

Results 1 to 8 of 8

Thread: Toggle Speaker Notes

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Contributor
    Joined
    Dec 2018
    Location
    South London
    Posts
    115
    Location

    Toggle Speaker Notes

    Hi John

    I've made the below code, because I need a button that toggles the slide (speaker) notes. The text that's below slides, which is in the Notes layout too.

    The aim was to have a toggle button, like the default one, to swap between ViewNotesPage and ViewNormal. It's for Office 2013. My VBA is totally wrong but hopefully you can help? I'm sure others would find this helpful too. Thank you


    Sub EnterSpeakerNotes()
    With ActiveWindow
    If .ActivePane.ViewType = ppViewNotesPage Then
    .Panes(3).Activate
    End If
    End With
    With ActiveWindow
    If .ActivePane.ViewType = ppViewNormal Then
    .Panes(3).Activate
    End If
    End With
    End Sub

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    If you mean opoen and close the notes area below the slide then yo have to use ActiveWindow.SplitVertical

    Sub toggle()
    Select Case ActiveWindow.SplitVertical
    Case Is = 100
    ActiveWindow.SplitVertical = 90 '90% slide 10% notes
    Case Else
    ActiveWindow.SplitVertical = 100
    End Select
    End Sub
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    VBAX Contributor
    Joined
    Dec 2018
    Location
    South London
    Posts
    115
    Location

    2 Toggle Buttons for Notes Pages

    Hi John

    Sorry, I know you're really busy, I should have called it Notes Page. I need two separate toggle buttons please:
    (As found on the View tab, 'Notes Page')

    1: A toggle button between Notes Page and Normal view

    2: A toggle button for Notes Page Layout - Portrait or Landscape

    I've looked everywhere , my efforts fail, and I didn't bookmark a site with the MS button VBA labels (?)

    Many thanks

    That code was great though, thank you
    Last edited by RayKay; 01-11-2019 at 05:46 AM.

  4. #4
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    Maybe this will give you somewhere to start

    Sub NotesOrient_Toggle()
    Dim Orient As Long
    Orient = ActivePresentation.PageSetup.NotesOrientation
    Select Case Orient
    Case 1
    ActivePresentation.PageSetup.NotesOrientation = 2
    Case 2
    ActivePresentation.PageSetup.NotesOrientation = 1
    End Select
    End Sub
    
    
    Sub notesToggle()
    If ActiveWindow.ViewType = ppViewNotesPage Then
    ActiveWindow.ViewType = ppViewNormal
    Else
    ActiveWindow.ViewType = ppViewNotesPage
    End If
    End Sub
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  5. #5
    VBAX Contributor
    Joined
    Dec 2018
    Location
    South London
    Posts
    115
    Location

    Toggle Hide and Unhide Slide(s)

    Hi John

    Thanks for the code, works great. I just discovered one more toggle, but my code fails

    Sub ToggleHideSlide()
    If ActiveWindow.ViewType = ppViewNormal Then
    ActiveWindow.ViewType = ppHideSlide
    Else
    ActiveWindow.ViewType = ppUnhideSlide
    End If
    End Sub

    Thank you in advance

  6. #6
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    ppHideSlide and ppUnhideSlide are not ViewTypes and will always fail in this context.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  7. #7
    VBAX Contributor
    Joined
    Dec 2018
    Location
    South London
    Posts
    115
    Location
    Quote Originally Posted by John Wilson View Post
    ppHideSlide and ppUnhideSlide are not ViewTypes and will always fail in this context.
    Hi John

    Thanks, is this the code I need? To get the Toggle button for Hide and Unhide slide(s).


    Sub ToggleHideSlide()
    If ActiveWindow.ViewType = ppViewNormal Then
    ActiveWindow.ViewType = ppSlideHide
    End If
    End Sub


    Thanks in advance.

  8. #8
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    No there's no such method as ppSlideHide

    If you want to make a slide as hidden

    Dim osld As Slide
    Set osld = ActiveWindow.Selection.SlideRange(1)
    osld.SlideShowTransition.Hidden = False ' Or True
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

Tags for this Thread

Posting Permissions

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