1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
| Sub nouvelOF()
Dim r, c As Integer
r = 3
c = 1
Dim PPTApp As PowerPoint.Application
Dim PPTDoc As PowerPoint.Presentation
Dim Sh As PowerPoint.Shape
Dim Pres As PowerPoint.Presentation
While r < 40
c = 1
If Sheets("Interface").Cells(5, 2).Value = Sheets("Data").Cells(r, c).Value Then
'ouvrir powerpoint
Set PPTApp = CreateObject("PowerPoint.application")
PPTApp.Visible = True
Set PPTDoc = PPTApp.Presentations.Open("S/visuel OF.PPTM")
For Each objet In ActivePresentation.Slides(1).Shapes
MsgBox objet.Name
Next
'Référence finie
c = 2
If Sheets("Data").Cells(r, c).Value <> "" Then
x = ThisWorkbook.Sheets("Data").Cells(r, c).Value
For i = 1 To 2
For j = 1 To 3
With Sh.Table.Cell(i, j).Shape.TextFrame.TextRange
.Text = ThisWorkbook.Sheets("Data").Cells(r, c).Value.Text
.ParagraphFormat.Alignment = ppAlignCenter
End With
Next j
Next i
End If
'ref brute
c = 3
'ref brute
c = 4
'ref brute
c = 5
'ref brute
c = 6
'ref brute
c = 7
'ref brute
c = 8
'ref brute
c = 9
End If
r = r + 1
Wend
End Sub |
Partager