G
Greg Dunn
In my PPT slide decks, I want to have both instructor-only notes, and notes
intended for students. Before distributing, I will need to delete the
instructor-only notes, but leave the others.
Therefore I need a macro to delete a *tagged section* of the notes; e.g., if
the material below (between the dashed lines) were a note for a particular
slide, I would want to remove everything between the "/*" and "*/" tags,
including the tags.
-------------------------------------------------------------------------------------
/* Be sure to not to run this code during the demonstration: it will
reformat your hard disk!
*/
The above code, students, is an example of a program you should never write.
--------------------------------------------------------------------------------------
I've found a couple of macros to delete the notes, period, which I've
included below. If someone can show me how to enhance one of these (or do
something else) to delete only the tagged regions, I would greatly
appreciate it.
Thanks,
Greg Dunn
Delete All Notes: Solution #1 (from Bill Dilworth, 2005-06-23)
Sub BlitzTheNotesText()
Dim oSl As Slide
Dim oSh as Shape
For Each oSl In ActivePresentation.Slides
' Check each shape on the slide's notes page
For Each oSh in oSl.NotesPage.Shapes
' Is the shape a body text placeholder?
' If so, delete it.
If oSh.PlaceHolderFormat.Type = ppPlaceholderBody Then
oSh.Delete
End if
Next oSh
Next oSl
End Sub
Delete All Notes: Solution #2 (from Joshua Seigler, 2/18/2005 )
Dim objSlide As Slide
Dim objShape As Shape
For Each objSlide In ActivePresentation.Slides
For Each objShape In objSlide.NotesPage.Shapes
If objShape.TextFrame.HasText Then
objShape.TextFrame.TextRange = ""
End If
Next
Next
intended for students. Before distributing, I will need to delete the
instructor-only notes, but leave the others.
Therefore I need a macro to delete a *tagged section* of the notes; e.g., if
the material below (between the dashed lines) were a note for a particular
slide, I would want to remove everything between the "/*" and "*/" tags,
including the tags.
-------------------------------------------------------------------------------------
/* Be sure to not to run this code during the demonstration: it will
reformat your hard disk!
*/
The above code, students, is an example of a program you should never write.
--------------------------------------------------------------------------------------
I've found a couple of macros to delete the notes, period, which I've
included below. If someone can show me how to enhance one of these (or do
something else) to delete only the tagged regions, I would greatly
appreciate it.
Thanks,
Greg Dunn
Delete All Notes: Solution #1 (from Bill Dilworth, 2005-06-23)
Sub BlitzTheNotesText()
Dim oSl As Slide
Dim oSh as Shape
For Each oSl In ActivePresentation.Slides
' Check each shape on the slide's notes page
For Each oSh in oSl.NotesPage.Shapes
' Is the shape a body text placeholder?
' If so, delete it.
If oSh.PlaceHolderFormat.Type = ppPlaceholderBody Then
oSh.Delete
End if
Next oSh
Next oSl
End Sub
Delete All Notes: Solution #2 (from Joshua Seigler, 2/18/2005 )
Dim objSlide As Slide
Dim objShape As Shape
For Each objSlide In ActivePresentation.Slides
For Each objShape In objSlide.NotesPage.Shapes
If objShape.TextFrame.HasText Then
objShape.TextFrame.TextRange = ""
End If
Next
Next