Bonjour Stéphanie94 et le forum,
voici ma proposition. J’ai créé un form pour tester la saisie des données, si tu l'as déjà dans ton fichier il suffit d'ajouter après la dernière ligne de ton code le code suivant qui rappelle la macro
Call PPTableMacro
Il faut adapter dans le code le chemin et le nom des fichiers. Chaque présentation PowerPoint est enregistré avec le nom dans la colonne Authors (3ème colonne). ci-dessous le code:
Sub PPTableMacro()
Dim strPresPath As String, strExcelFilePath As String, strNewPresPath As String
Dim wksht As Worksheet
Dim Dlig As Integer
Dim SlideNom As String
Set wksht = ThisWorkbook.Sheets("Feuil1")
Dlig = wksht.Cells(Rows.Count, 1).End(xlUp).Row
'====>> à ADAPTER le chemin et le nom du fichier
strPresPath = "C:\Users\Sequoyah\Forum\publication-form-2.pptx"
strNewPresPath = "C:\Users\Sequoyah\Forum\"
Set oPPTApp = CreateObject("PowerPoint.Application")
oPPTApp.Visible = msoTrue
Set oPPTFile = oPPTApp.Presentations.Open(strPresPath)
SlideNum = 1
oPPTFile.Slides(SlideNum).Select
Set oPPTShape1 = oPPTFile.Slides(1).Shapes(1) 'objectives
Set oPPTShape2 = oPPTFile.Slides(1).Shapes(4) 'authors
Set oPPTShape3 = oPPTFile.Slides(1).Shapes(6) 'contributor
Set oPPTShape4 = oPPTFile.Slides(1).Shapes(13) 'message
Set oPPTShape5 = oPPTFile.Slides(1).Shapes(14) 'Advantage for us
Set oPPTShape6 = oPPTFile.Slides(1).Shapes(15) 'publication type
Set oPPTShape7 = oPPTFile.Slides(1).Shapes(9) 'Timelines
With oPPTShape1
.TextFrame.TextRange.Text = Cells(Dlig, 2).Text
End With
With oPPTShape2
.TextFrame.TextRange.Text = Cells(Dlig, 3).Text
End With
With oPPTShape3
.TextFrame.TextRange.Text = Cells(Dlig, 5).Text
End With
With oPPTShape4
.TextFrame.TextRange.Text = Cells(Dlig, 4).Text
End With
With oPPTShape5
.TextFrame.TextRange.Text = Cells(Dlig, 8).Text
End With
With oPPTShape6
.TextFrame.TextRange.Text = Cells(Dlig, 6).Text
End With
With oPPTShape7
.TextFrame.TextRange.Text = Cells(Dlig, 7).Text
End With
oPPTFile.SaveAs strNewPresPath & Cells(Dlig, 3).Text
oPPTFile.Close
oPPTApp.Quit
Set oPPTFile = Nothing
Set oPPTApp = Nothing
End Sub