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
| Private Sub ouvrirppt_Click()
S = langue.Value
Dim FichierPpt, pwpt, presppt
Set pwpt = CreateObject("PowerPoint.Application")
pwpt.Visible = True
Set presppt = pwpt.Presentations.Open(Filename:=ThisWorkbook.Path & "\" & "presentation.pptx")
pwpt.Visible = True
With presppt
Dim I As Byte
With .Slides(1).Shapes("Text Box 46").TextFrame.TextRange
.text = nom & vbCrLf & Box2 & Box3 & vbCrLf & "Tel.: " & Box4 & "Email: " & Box7
With .Characters(1, Len(nom)).Font
.Size = 15
.Bold = True
End With
End With
.Slides(1).Shapes("Text Box 11").TextFrame.TextRange.text = Box17
With .Slides(1).Shapes("Text Box 6").TextFrame.TextRange
.text = Box12 & " " & Label5.Caption & vbCrLf & Box13 & vbCrLf & Box14 & vbCrLf & Box15 & vbCrLf & Box16 _
& vbCrLf & Box8 & vbCrLf & Box9 & vbCrLf & Box10 & vbCrLf & Box11 _
& vbCrLf & Box18 & vbCrLf & Box19 & vbCrLf & Box20 & vbCrLf & Box21
With .Characters(1, Len(Box12) + Len(Label5.Caption) + 1).Font
.Size = 10
.Bold = True
End With
With .Characters(Len(Box12) + Len(Label5.Caption) + 1, Len(Box13) + 1).Font
.Size = 9
.Bold = False
End With
With .Paragraphs(2)
.ParagraphFormat.Bullet.Type = ppBulletUnnumbered
End With
With .Paragraphs(3)
.ParagraphFormat.Bullet.Type = ppBulletUnnumbered
End With
With .Paragraphs(4)
.ParagraphFormat.Bullet.Type = ppBulletUnnumbered
End With
End With
End With
End Sub |
Partager