2010-06-01 13 views

Répondre

5

This guy a écrit un script qui supprime les notes de haut-parleur de tous les fichiers PowerPoint dans un répertoire. Vous devriez être capable de l'adapter à vos besoins.

Sub RemoveSpeakerNotes() 
    Set objPPT = CreateObject("PowerPoint.Application") 
    objPPT.Visible = True 
    strComputer = "." 
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") 
    Set FileList = objWMIService.ExecQuery _ 
    ("ASSOCIATORS OF {Win32_Directory.Name='E:\DirectoryContainingPresentations'} Where " _ 
    & "ResultClass = CIM_DataFile") 
    For Each objFile In FileList 
    If objFile.Extension = "pptx" Or objFile.Extension = "ppt" Then 
     Set objPresentation = objPPT.Presentations.Open(objFile.Name) 
     Set colSlides = objPresentation.Slides 
     On Error Resume Next 
     For Each objSlide In colSlides 
     objSlide.NotesPage.Shapes(2).TextFrame.TextRange = "" 
     Next 
     objPresentation.Save 
     objPresentation.Close 
    End If 
    Next 
    MsgBox ("Done") 
End Sub 
+0

C'est parfait, juste ce dont j'avais besoin! – Meihua

+0

Ensuite, vous devez accepter cette réponse en cliquant sur la coche vide à gauche. – BenV

+0

Oh, désolé pour ça. Je viens de le faire. Merci encore! – Meihua