0

「E」キーストロークを送信する代わりに、PowerPoint 2003/2007/2010 のスライド上のユーザーのペン描画と注釈をプログラムで消去したいと考えています。

SlideShowView.EraseDrawingによって作成された行のみを消去することがわかりましたSlideShowView.DrawLine

サンプルコード:

PowerPoint.Application.ActivePresentation.SlideShowSettings.Run.View.EraseDrawing

回答ありがとうございます。ルジョビドン

4

2 に答える 2

0

This gives the user the option of keeping or deleting the ink, then goes back to the original slide in slide show view. STILL not what you're after, really, but it's as close as I've been able to get so far:

Private Sub CommandButton1_Click()
    Dim x As Long
    x = SlideShowWindows(1).View.Slide.SlideIndex

    With SlideShowWindows(1)
        .View.Exit
    End With

    With ActivePresentation
        .SlideShowSettings.Run
    End With

    SlideShowWindows(1).View.GotoSlide (x)

End Sub
于 2012-05-07T14:54:02.917 に答える
0

スライド ショーを停止し、描画を保持することを選択した後で、ペン描画を削除しようとしていますか? その場合、描画を消去したい任意のスライドで以下の EraseInkOnSlide 関数を呼び出します。

Sub TestMe()
    EraseInkOnSlide ActivePresentation.Slides(1)
End Sub

Sub EraseInkOnSlide(oSl As Slide)
' Erases any INK shapes drawn by the user and 
' retained when the user quits the slide show
    Dim oSh As Shape
    Dim x As Long
    With oSl.Shapes
    For x = .Count To 1 Step -1
        If .Item(x).Type = 23 Then
            .Item(x).Delete
        End If
    Next
    End With
End Sub

これをスライドショーモードで機能させるには、スライドショーモードを一時的に終了してから、スライドショーモードで現在のスライドに戻る必要があると思います。PPT は、ユーザーがショーを終了し、形状を保持することを選択するまで、インク形状をスライドの形状コレクションの一部とは見なさないようです。変。

于 2012-05-06T22:05:57.437 に答える