TPE

http://bayanbox.ir/view/263405954590585756/2mobile.png

Tavvafi@gmail.com


≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡

کدی که میتواند همه Shape ها را note page ها حذف نماید.

Sub DelNotesShapes()
Dim oSld As Slide
For Each oSld In ActivePresentation.Slides
    If oSld.NotesPage.Shapes.Count > 0 Then
        oSld.NotesPage.Shapes.Range.Delete
    End If
Next oSld
Set oSld = Nothing
End Sub

یک کد دیگر:

Sub BlitzTheNotes()

Dim oSlides As Slides
Dim oSl As Slide
Dim x As Integer

Set oSlides = ActivePresentation.Slides
For Each oSl In oSlides
    For x = oSl.NotesPage.Shapes.Count to 1 Step -1
        oSl.NotesPage.Shapes(1).Delete
    Next x
Next oSl

End Sub

هر دو روال کمی عجیب به نظر می رسند، اما از چنین کلیت استفاده می کنند

For X = 1 to .Shapes.Count

    .Shapes(X).Delete

Next X

این کد هم به متن یاددشت توجه دارد:

Sub BlitzTheNotesText()

    Dim oSl As Slide
    Dim oSh As Shape

    For Each oSl In ActivePresentation.Slides
        ' Locate and delete the notes page body text placeholder
        For Each oSh In oSl.NotesPage.Shapes
            If oSh.Type = msoPlaceholder Then
                ' Is the shape a body text placeholder?  If so, delete it.
                If oSh.PlaceholderFormat.Type = ppPlaceholderBody Then
                    oSh.Delete
                    ' or if you'd rather not delete the notes, use oSh.Visible = False
                    ' change it to oSh.Visible = True and rerun the macro to reverse the effect
                End If
            End If
        Next oSh
    Next oSl

End Sub