Advertisement
gn4711

PowerPoint Reapply Notes Master to all Slides

Oct 4th, 2012
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub ApplyMasterToNotes()
  2.  ' Modified version of code originally posted to
  3. ' msnews.microsoft.com public newsgroups by
  4. ' David Foster in May of 1999
  5.     Dim ctl As CommandBarControl
  6.     Dim oSl As Slide
  7.      ' 700 is the control ID for Layout
  8.    Set ctl = CommandBars.FindControl(Id:=700)
  9.     ActiveWindow.ViewType = ppViewNotesPage
  10.      If (ctl Is Nothing) Then
  11.         MsgBox "command not available"
  12.         Exit Sub
  13.     End If
  14.      For Each oSl In ActivePresentation.Slides
  15.          ' go to the current slide
  16.        ActiveWindow.View.GotoSlide (oSl.SlideIndex)
  17.         DoEvents
  18.          ' Bring up the dialog
  19.        ctl.Execute
  20.         DoEvents
  21.          ' send it the needed keystrokes
  22.        SendKeys "%r{enter}"
  23.         DoEvents
  24.      Next
  25.  End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement