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
| Sub test_creation_page_slide()
'
' Macro recorded 30/04/2009 by BM1500
'
Dim PptApp As PowerPoint.Application
Dim PptDoc As PowerPoint.Presentation
Dim Diapo As PowerPoint.Slide
Dim Sh As PowerPoint.Shape
Dim Cs1 As ColorScheme
Dim NbShpe As Integer
Dim i As Integer
Dim k As Integer
Dim j As Integer
Set Diapo = .Slides.Add(Index:=1, Layout:=ppLayoutBlank)
Set Sh = .Slides(1).Shapes.AddLabel(Orientation:=msoTextOrientationHorizontal, _
Left:=100, Top:=100, Width:=150, Height:=30)
'insert the value in a text field
Sh.TextFrame.TextRange.Text = "champ 1:" & " " & Worksheets(k).Cells(i, 2)
Sh.TextFrame.TextRange.Font.Size = 12
Set Sh = .Slides(1).Shapes.AddLabel(Orientation:=msoTextOrientationHorizontal, _
Left:=300, Top:=100, Width:=150, Height:=60)
'insert the value in a text field
Sh.TextFrame.TextRange.Text = "Champ 2" & " " & Worksheets(k).Cells(i, 4)
Sh.TextFrame.TextRange.Font.Size = 12
Set Sh = .Slides(1).Shapes.AddLabel(Orientation:=msoTextOrientationHorizontal, _
Left:=100, Top:=120, Width:=150, Height:=60)
'insert the value in a text field
Sh.TextFrame.TextRange.Text = "Champ 3" & " " & Worksheets(k).Cells(i, 6)
Sh.TextFrame.TextRange.Font.Size = 12
Set Sh = .Slides(1).Shapes.AddLabel(Orientation:=msoTextOrientationHorizontal, _
Left:=100, Top:=450, Width:=500, Height:=30)
'insert teh value in a text field
Sh.TextFrame.TextRange.Text = "Champ 4:" & " " & Worksheets(k).Cells(i, 7)
Sh.TextFrame.TextRange.Font.Size = 12
Set Sh = .Slides(1).Shapes.AddLabel(Orientation:=msoTextOrientationHorizontal, _
Left:=100, Top:=180, Width:=200, Height:=260)
'insert the value in a text field
Sh.TextFrame.TextRange.Text = "Champ 5"&" "&Worksheets(k).Cells(i, 8) |
Partager