Hi All,
I have created a macro that creates a powerpoint from excel in office 2010. I have followed all the required steps, like adding object library and all. but still many times the PowerPoint crashes at slide7, 8 or 9 and have to restart. I generally get the above given error. I am still an amateur, please point me to what I am exactly missing.
Code is given below.
thanks
Pallavi
I have created a macro that creates a powerpoint from excel in office 2010. I have followed all the required steps, like adding object library and all. but still many times the PowerPoint crashes at slide7, 8 or 9 and have to restart. I generally get the above given error. I am still an amateur, please point me to what I am exactly missing.
Code is given below.
Code:
Sub CreatePowerPoint()
Application.ScreenUpdating = False
'Macro Created by Pallavi NC (pallavi.nc@hp.com)
'Add a reference to the Microsoft PowerPoint Library by:
'1. Go to Tools in the VBA menu
'2. Click on Reference
'3. Scroll down to Microsoft PowerPoint X.0 Object Library, check the box, and press Okay
'First we declare the variables we will be using
Dim newPowerPoint As PowerPoint.Application
Dim activeSlide As PowerPoint.Slide
Dim cht As Excel.ChartObject
Dim oPPTFile As PowerPoint.Presentation
Dim wb As Workbook
Dim Shape1 As Object
Dim Shape2 As Object
Dim Shape3 As Object
Dim Shape1_4 As Object
Dim Shape2_4 As Object
Dim Shape1_5 As Object
Dim Shape2_5 As Object
Dim Shape3_5 As Object
Dim Shape4_5 As Object
Dim Shape1_7 As Object
Dim Shape2_7 As Object
Dim Shape3_7 As Object
Dim Shape4_7 As Object
Dim Shape5_7 As Object
Dim Shape6_7 As Object
Dim Shape7_7 As Object
Dim Shape8_7 As Object
Dim Shape1_8 As Object
Dim Shape2_8 As Object
Dim Shape3_8 As Object
Dim Shape4_8 As Object
Dim Shape5_8 As Object
Dim Shape6_8 As Object
Dim Shape1_9 As Object
Dim Shape2_9 As Object
Dim Shape3_9 As Object
Dim Shape4_9 As Object
Dim c As Range
Dim lngRow As Long
Dim lngCol As Long
Dim objTable As Table
Dim strTemplate As String
Dim x As Long
Const Factor As Integer = 72
Set wb = ThisWorkbook
'Look for existing instance
On Error Resume Next
Set newPowerPoint = GetObject(, "PowerPoint.Application")
On Error GoTo 0
strTemplate = InputBox("Please enter the folder where the Template is saved", "Path to Open HP Simplified Template", "Enter in the following format (C:\Users\ncp\Desktop\Cadnce\HP_PPT_Standard_16x9.potx)")
'Let's create a new PowerPoint
If newPowerPoint Is Nothing Then
Set newPowerPoint = New PowerPoint.Application
End If
'Show the PowerPoint
newPowerPoint.Visible = True
newPowerPoint.Presentations.Open strTemplate, untitled:=msoTrue
For x = newPowerPoint.ActivePresentation.Slides.Count To 1 Step -1
newPowerPoint.ActivePresentation.Slides(x).Delete
Next x
'Apply Powerpoint Layout
Filename = InputBox("Please enter the folder where the file will be saved with the filename", "Filename and Folder Path", "Enter in the following format (C:\Users\ncp\Desktop\Cadnce\SEA-Review-August'13.pptx)")
Set oPPTFile = newPowerPoint.ActivePresentation
oPPTFile.SaveAs Filename
'Add the title slide
Set activeSlide = oPPTFile.Slides.Add(1, ppLayoutCustom)
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 10, 20, 300, 5
activeSlide.Shapes(1).TextFrame.TextRange.Text = "SEA Business Review"
newText = InputBox("Please enter the month and year in following format (August 2013)")
activeSlide.Shapes(2).TextFrame.TextRange.Text = newText
Set activeSlide = Nothing
'Add Slide 2
Set activeSlide = oPPTFile.Slides.Add(2, ppLayoutBlank)
ThisWorkbook.Sheets("Slide1").Shapes("Picture 5").Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActivePresentation.Slides(2).Shapes.Paste.Select
Visible = True
Application.CutCopyMode = False
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Height = 0.5 * Factor
.Width = 0.5 * Factor
.Left = 0.16 * Factor
.Top = 0.28 * Factor
End With
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 59.76, 13.68, 372.96, 36.72
activeSlide.Shapes(2).TextFrame.TextRange.Text = "Enterprise Services Scorecard "
activeSlide.Shapes(2).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 24
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Name = "HP Simplified"
.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
End With
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 414.72, 16.56, 36.72, 32.4
activeSlide.Shapes(3).TextFrame.TextRange.Text = "½"
activeSlide.Shapes(3).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 24
.TextFrame.TextRange.Font.Bold = msoFalse
.TextFrame.TextRange.Font.Name = "Symbol"
.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
End With
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 430.56, 16.56, 64.08, 36.72
activeSlide.Shapes(4).TextFrame.TextRange.Text = "SEA"
activeSlide.Shapes(4).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 24
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Name = "HP Simplified"
.TextFrame.TextRange.Font.Color.RGB = RGB(0, 150, 214)
End With
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 59.76, 38.8, 97.92, 36.72
activeSlide.Shapes(5).TextFrame.TextRange.Text = InputBox("Please enter the month in the following format (August)")
activeSlide.Shapes(5).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 24
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Name = "HP Simplified"
.TextFrame.TextRange.Font.Color.RGB = RGB(127, 127, 127)
End With
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 571.68, 0, 148.32, 21.6
activeSlide.Shapes(6).TextFrame.TextRange.Text = "EXECUTIVE SUMMARY"
activeSlide.Shapes(6).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 12
.TextFrame.TextRange.Font.Bold = msoFalse
.TextFrame.TextRange.Font.Name = "HP Simplified (Body)"
.TextFrame.TextRange.Font.Color.RGB = RGB(127, 127, 127)
End With
ThisWorkbook.Sheets("Slide1").Range("U10:V13").Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActiveWindow.View.Paste
Application.CutCopyMode = False
activeSlide.Shapes(7).Select
Visible = True
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Left = 7.13 * Factor
.Top = 0.27 * Factor
.Height = 0.74 * Factor
.Width = 2.8 * Factor
End With
With newPowerPoint.ActivePresentation.Slides(2).Shapes
Set Shape1 = .AddShape(msoShapeRectangle, 576.72, 80.64, 129.6, 17.28)
End With
With Shape1.Fill
.Solid
.ForeColor.RGB = RGB(135, 137, 139)
End With
Shape1.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "Key Insights"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(2).Shapes
Set Shape2 = .AddShape(msoShapeRectangle, 576.72, 81.36, 129.6, 313.92)
End With
With Shape2.Fill
.Visible = msoFalse
End With
Shape2.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Line.Weight = 1.5
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineThickBetweenThin
.Line.ForeColor.RGB = RGB(135, 137, 139)
End With
With newPowerPoint.ActivePresentation.Slides(2).Shapes
Set Shape3 = .AddShape(msoShapeRectangle, 40.32, 347.04, 663.84, 51.12)
End With
With Shape3.Fill
.Solid
.ForeColor.RGB = RGB(255, 255, 255)
End With
Shape3.Select
newPowerPoint.ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBack
ThisWorkbook.Sheets("Slide1").Range("B8:R28").Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActiveWindow.View.Paste
activeSlide.Shapes(11).Select
Application.CutCopyMode = False
Visible = True
Set objTable = newPowerPoint.ActiveWindow.Selection.ShapeRange.Table
For lngRow = 1 To objTable.Rows.Count
For lngCol = 1 To objTable.Columns.Count
If objTable.Rows(lngRow).Cells(lngCol).Selected Then
With objTable.Rows(lngRow).Cells(lngCol).Shape.TextFrame.TextRange.Font
.Size = 7
End With
End If
Next
Next
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Left = 0.16 * Factor
.Top = 1.12 * Factor
.Height = 3.7 * Factor
.Width = 7.78 * Factor
End With
Set activeSlide = Nothing
Set Shape1 = Nothing
Set Shape2 = Nothing
Set Shape3 = Nothing
'Add Slide 3
Set activeSlide = oPPTFile.Slides.Add(3, ppLayoutBlank)
newPowerPoint.ActivePresentation.Slides(3).CustomLayout = newPowerPoint.ActivePresentation.Designs(1).SlideMaster.CustomLayouts(3)
activeSlide.Shapes(1).TextFrame.TextRange.Text = "Sales"
activeSlide.Shapes(2).Delete
'Add Slide 4
Set activeSlide = oPPTFile.Slides.Add(4, ppLayoutBlank)
activeSlide.Select
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 12.24, 18.72, 364.32, 33.84
activeSlide.Shapes(1).TextFrame.TextRange.Text = "Overall sales performance"
activeSlide.Shapes(1).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 28
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Name = "HP Simplified"
.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
End With
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 661.68, 2.16, 44.64, 14.4
activeSlide.Shapes(2).TextFrame.TextRange.Text = "SALES"
activeSlide.Shapes(2).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 12
.TextFrame.TextRange.Font.Bold = msoFalse
.TextFrame.TextRange.Font.Name = "HP Simplified (Body)"
.TextFrame.TextRange.Font.Color.RGB = RGB(135, 137, 139)
End With
ThisWorkbook.Sheets("Slide2").Range("X21:X24").Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActiveWindow.View.Paste
Application.CutCopyMode = False
activeSlide.Shapes(3).Select
Visible = True
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Left = 8.67 * Factor
.Top = 0.23 * Factor
.Height = 0.72 * Factor
.Width = 1.28 * Factor
End With
With newPowerPoint.ActivePresentation.Slides(4).Shapes
Set Shape1_4 = .AddShape(msoShapeRectangle, 591.12, 73.44, 108.72, 17.28)
End With
With Shape1_4.Fill
.Solid
.ForeColor.RGB = RGB(135, 137, 139)
End With
Shape1_4.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "Key Insights"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(4).Shapes
Set Shape2_4 = .AddShape(msoShapeRectangle, 591.12, 73.44, 108.72, 283.68)
End With
With Shape2_4.Fill
.Visible = msoFalse
End With
Shape2_4.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Line.Weight = 1.5
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineThickBetweenThin
.Line.ForeColor.RGB = RGB(135, 137, 139)
End With
ThisWorkbook.Sheets("Slide2").Range("B8:R20").Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActiveWindow.View.Paste
Application.CutCopyMode = False
activeSlide.Shapes(6).Select
Visible = True
Set objTable = newPowerPoint.ActiveWindow.Selection.ShapeRange.Table
For lngRow = 1 To objTable.Rows.Count
For lngCol = 1 To objTable.Columns.Count
If objTable.Rows(lngRow).Cells(lngCol).Selected Then
With objTable.Rows(lngRow).Cells(lngCol).Shape.TextFrame.TextRange.Font
.Name = "HP Simplified"
.Size = 10
End With
End If
Next
Next
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Left = 0.17 * Factor
.Top = 1.01 * Factor
.Height = 3.92 * Factor
.Width = 7.95 * Factor
End With
Set activeSlide = Nothing
Set Shape1_4 = Nothing
Set Shape2_4 = Nothing
'Add Slide 5
Set activeSlide = oPPTFile.Slides.Add(5, ppLayoutBlank)
activeSlide.Select
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 16.56, 15.12, 496.08, 33.84
activeSlide.Shapes(1).TextFrame.TextRange.Text = "Win rate trends and top deals/losses"
activeSlide.Shapes(1).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 28
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Name = "HP Simplified"
.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
End With
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 661.68, 2.16, 44.64, 14.4
activeSlide.Shapes(2).TextFrame.TextRange.Text = "SALES"
activeSlide.Shapes(2).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 12
.TextFrame.TextRange.Font.Bold = msoFalse
.TextFrame.TextRange.Font.Name = "HP Simplified (Body)"
.TextFrame.TextRange.Font.Color.RGB = RGB(135, 137, 139)
End With
ThisWorkbook.Sheets("3.Win rate trends").Shapes("Group 1").Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActiveWindow.View.Paste
Application.CutCopyMode = False
activeSlide.Shapes(3).Select
Visible = True
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Left = 0.2 * Factor
.Top = 0.73 * Factor
.Height = 2.84 * Factor
.Width = 4.09 * Factor
End With
With newPowerPoint.ActivePresentation.Slides(5).Shapes
Set Shape1_5 = .AddShape(msoShapeRectangle, 316.08, 54, 389.52, 14.4)
End With
With Shape1_5.Fill
.Solid
.ForeColor.RGB = RGB(0, 150, 214)
End With
Shape1_5.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "Top 5 Deals/Losses This Month"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(5).Shapes
Set Shape2_5 = .AddShape(msoShapeRectangle, 316.08, 53.28, 389.52, 204.48)
End With
With Shape2_5.Fill
.Visible = msoFalse
End With
Shape2_5.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Line.Weight = 1.5
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineThickBetweenThin
.Line.ForeColor.RGB = RGB(0, 150, 214)
ThisWorkbook.Worksheets("3.Win rate trends").Activate
ThisWorkbook.Sheets("3.Win rate trends").Range("J5:O16").Copy
ActiveSheet.Range("J22").Select
ActiveSheet.Paste
ActiveSheet.Range("P23:P33").Select
For Each c In Range("P23:P33")
If c.Value = 0 Then
c.EntireRow.Hidden = True
Else
c.EntireRow.Hidden = False
End If
Next c
ActiveSheet.Range("J22:O33").Cells.SpecialCells(xlCellTypeVisible).Select
Selection.Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActiveWindow.View.Paste
Application.CutCopyMode = False
ThisWorkbook.Sheets("3.Win rate trends").Range("J22:O33").EntireRow.Hidden = False
ThisWorkbook.Sheets("3.Win rate trends").Range("J22:O33").ClearContents
activeSlide.Shapes(6).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Left = 4.42 * Factor
.Top = 0.99 * Factor
.Height = 2.5 * Factor
.Width = 5.33 * Factor
End With
With newPowerPoint.ActivePresentation.Slides(5).Shapes
Set Shape3_5 = .AddShape(msoShapeRectangle, 12.24, 274.32, 691.2, 23.76)
End With
With Shape3_5.Fill
.Solid
.ForeColor.RGB = RGB(135, 137, 139)
End With
Shape3_5.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "Key Insights"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(5).Shapes
Set Shape4_5 = .AddShape(msoShapeRectangle, 12.24, 274.32, 691.2, 113.76)
End With
With Shape4_5.Fill
.Solid
.ForeColor.RGB = RGB(255, 255, 255)
End With
Shape4_5.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Line.Weight = 1.5
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineThickBetweenThin
.Line.ForeColor.RGB = RGB(135, 137, 139)
End With
Shape4_5.Select
newPowerPoint.ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBack
Set activeSlide = Nothing
Set Shape1_5 = Nothing
Set Shape2_5 = Nothing
Set Shape3_5 = Nothing
Set Shape4_5 = Nothing
'Add Slide 6
Set activeSlide = oPPTFile.Slides.Add(6, ppLayoutBlank)
newPowerPoint.ActivePresentation.Slides(6).CustomLayout = newPowerPoint.ActivePresentation.Designs(1).SlideMaster.CustomLayouts(3)
activeSlide.Shapes(1).TextFrame.TextRange.Text = "Service Quality"
activeSlide.Shapes(2).Delete
Set activeSlide = Nothing
'Add Slide 7
Set activeSlide = oPPTFile.Slides.Add(7, ppLayoutBlank)
activeSlide.Select
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 9.36, 18, 341.28, 33.84
activeSlide.Shapes(1).TextFrame.TextRange.Text = "Quality dashboard - SEA"
activeSlide.Shapes(1).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 28
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Name = "HP Simplified"
.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
End With
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 606.24, 2.16, 110.16, 14.4
activeSlide.Shapes(2).TextFrame.TextRange.Text = "SERVICE QUALITY"
activeSlide.Shapes(2).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 12
.TextFrame.TextRange.Font.Bold = msoFalse
.TextFrame.TextRange.Font.Name = "HP Simplified (Body)"
.TextFrame.TextRange.Font.Color.RGB = RGB(135, 137, 139)
End With
With newPowerPoint.ActivePresentation.Slides(7).Shapes
Set Shape1_7 = .AddShape(msoShapeRectangle, 558, 54, 149.76, 18)
End With
With Shape1_7.Fill
.Solid
.ForeColor.RGB = RGB(135, 137, 139)
End With
Shape1_7.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "Key Insights"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(7).Shapes
Set Shape2_7 = .AddShape(msoShapeRectangle, 558, 54, 149.76, 334.8)
End With
With Shape2_7.Fill
.Solid
.ForeColor.RGB = RGB(255, 255, 255)
End With
Shape2_7.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Line.Weight = 1.5
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineThickBetweenThin
.Line.ForeColor.RGB = RGB(135, 137, 139)
End With
Shape2_7.Select
newPowerPoint.ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBack
With newPowerPoint.ActivePresentation.Slides(7).Shapes
Set Shape3_7 = .AddShape(msoShapeRectangle, 9.36, 54, 266.4, 17.28)
End With
With Shape3_7.Fill
.Solid
.ForeColor.RGB = RGB(0, 150, 214)
End With
Shape3_7.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "SLA Performance"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(7).Shapes
Set Shape4_7 = .AddShape(msoShapeRectangle, 9.36, 54, 266.4, 165.6)
End With
With Shape4_7.Fill
.Visible = msoFalse
End With
Shape4_7.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Line.Weight = 1.5
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineThickBetweenThin
.Line.ForeColor.RGB = RGB(0, 150, 214)
End With
With newPowerPoint.ActivePresentation.Slides(7).Shapes
Set Shape5_7 = .AddShape(msoShapeRectangle, 285.12, 53.28, 266.4, 17.28)
End With
With Shape5_7.Fill
.Solid
.ForeColor.RGB = RGB(0, 150, 214)
End With
Shape5_7.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "P1 Trends"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(7).Shapes
Set Shape6_7 = .AddShape(msoShapeRectangle, 285.12, 53.28, 266.4, 165.6)
End With
With Shape6_7.Fill
.Visible = msoFalse
End With
Shape6_7.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Line.Weight = 1.5
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineThickBetweenThin
.Line.ForeColor.RGB = RGB(0, 150, 214)
End With
With newPowerPoint.ActivePresentation.Slides(7).Shapes
Set Shape7_7 = .AddShape(msoShapeRectangle, 9.36, 223.92, 266.4, 17.28)
End With
With Shape7_7.Fill
.Solid
.ForeColor.RGB = RGB(0, 150, 214)
End With
Shape7_7.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "P1 MTTR trends"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(7).Shapes
Set Shape8_7 = .AddShape(msoShapeRectangle, 9.36, 223.92, 266.4, 147.6)
End With
With Shape8_7.Fill
.Visible = msoFalse
End With
Shape8_7.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Line.Weight = 1.5
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineThickBetweenThin
.Line.ForeColor.RGB = RGB(0, 150, 214)
End With
ThisWorkbook.Sheets("5a.Quality dashboard1").Shapes("Chart 1").Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActiveWindow.View.Paste
Application.CutCopyMode = False
activeSlide.Shapes(11).Select
Visible = True
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Left = 0.23 * Factor
.Top = 1.2 * Factor
.Height = 1.8 * Factor
.Width = 3.2 * Factor
End With
ThisWorkbook.Sheets("5a.Quality dashboard1").Shapes("Object 1702").Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActiveWindow.View.Paste
Application.CutCopyMode = False
activeSlide.Shapes("Object 1702").Select
Visible = True
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Left = 4.02 * Factor
.Top = 1.09 * Factor
.Height = 1.9 * Factor
.Width = 3.23 * Factor
End With
Set activeSlide = Nothing
Set Shape1_7 = Nothing
Set Shape2_7 = Nothing
Set Shape3_7 = Nothing
Set Shape4_7 = Nothing
Set Shape5_7 = Nothing
Set Shape6_7 = Nothing
Set Shape7_7 = Nothing
Set Shape8_7 = Nothing
'Add Slide 8
Set activeSlide = oPPTFile.Slides.Add(8, ppLayoutBlank)
activeSlide.Select
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 33.12, 18.72, 340.56, 33.84
activeSlide.Shapes(1).TextFrame.TextRange.Text = "Quality dashboard - SEA"
activeSlide.Shapes(1).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 28
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Name = "HP Simplified"
.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
End With
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 606.24, 2.16, 110.16, 14.4
activeSlide.Shapes(2).TextFrame.TextRange.Text = "SERVICE QUALITY"
activeSlide.Shapes(2).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 12
.TextFrame.TextRange.Font.Bold = msoFalse
.TextFrame.TextRange.Font.Name = "HP Simplified (Body)"
.TextFrame.TextRange.Font.Color.RGB = RGB(135, 137, 139)
End With
With newPowerPoint.ActivePresentation.Slides(8).Shapes
Set Shape1_8 = .AddShape(msoShapeRectangle, 486, 52.56, 216, 18)
End With
With Shape1_8.Fill
.Solid
.ForeColor.RGB = RGB(135, 137, 139)
End With
Shape1_8.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "Key Insights"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(8).Shapes
Set Shape2_8 = .AddShape(msoShapeRectangle, 486, 52.56, 216, 334.8)
End With
With Shape2_8.Fill
.Solid
.ForeColor.RGB = RGB(255, 255, 255)
End With
Shape2_8.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Line.Weight = 1.5
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineThickBetweenThin
.Line.ForeColor.RGB = RGB(135, 137, 139)
End With
Shape2_8.Select
newPowerPoint.ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBack
With newPowerPoint.ActivePresentation.Slides(8).Shapes
Set Shape3_8 = .AddShape(msoShapeRectangle, 33.84, 54, 425.52, 16.56)
End With
With Shape3_8.Fill
.Solid
.ForeColor.RGB = RGB(0, 150, 214)
End With
Shape3_8.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "Red Projects Trends"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(8).Shapes
Set Shape4_8 = .AddShape(msoShapeRectangle, 33.84, 53.28, 425.52, 161.28)
End With
With Shape4_8.Fill
.Visible = msoFalse
End With
Shape4_8.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Line.Weight = 1.5
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineThickBetweenThin
.Line.ForeColor.RGB = RGB(0, 150, 214)
End With
With newPowerPoint.ActivePresentation.Slides(8).Shapes
Set Shape5_8 = .AddShape(msoShapeRectangle, 35.28, 226.8, 425.52, 16.56)
End With
With Shape5_8.Fill
.Solid
.ForeColor.RGB = RGB(0, 150, 214)
End With
Shape5_8.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "Red/Amber Projects By Sub-Region"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(8).Shapes
Set Shape6_8 = .AddShape(msoShapeRectangle, 34.56, 226.8, 425.52, 161.28)
End With
With Shape6_8.Fill
.Solid
.ForeColor.RGB = RGB(255, 255, 255)
End With
Shape6_8.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Line.Weight = 1.5
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineThickBetweenThin
.Line.ForeColor.RGB = RGB(0, 150, 214)
End With
ThisWorkbook.Sheets("5b.Quality dashboard2").Shapes("Object 275").Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActiveWindow.View.Paste
Application.CutCopyMode = False
activeSlide.Shapes("Object 275").Select
Visible = True
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Left = 0.58 * Factor
.Top = 1.04 * Factor
.Height = 1.84 * Factor
.Width = 5.69 * Factor
End With
ThisWorkbook.Sheets("5b.Quality dashboard2").Shapes("Object 274").Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActiveWindow.View.Paste
activeSlide.Shapes("Object 274").Select
Application.CutCopyMode = False
Visible = True
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Left = 0.57 * Factor
.Top = 3.42 * Factor
.Height = 1.93 * Factor
.Width = 5.67 * Factor
End With
Set activeSlide = Nothing
Set Shape1_8 = Nothing
Set Shape2_8 = Nothing
Set Shape3_8 = Nothing
Set Shape4_8 = Nothing
Set Shape5_8 = Nothing
Set Shape6_8 = Nothing
'Add Slide 9
Set activeSlide = oPPTFile.Slides.Add(9, ppLayoutBlank)
activeSlide.Select
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 25.92, 18.72, 396.72, 33.84
activeSlide.Shapes(1).TextFrame.TextRange.Text = "Voice and Pulse of the Client"
activeSlide.Shapes(1).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 28
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Name = "HP Simplified"
.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
End With
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 606.24, 2.16, 110.16, 14.4
activeSlide.Shapes(2).TextFrame.TextRange.Text = "SERVICE QUALITY"
activeSlide.Shapes(2).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 12
.TextFrame.TextRange.Font.Bold = msoFalse
.TextFrame.TextRange.Font.Name = "HP Simplified (Body)"
.TextFrame.TextRange.Font.Color.RGB = RGB(135, 137, 139)
End With
With newPowerPoint.ActivePresentation.Slides(9).Shapes
Set Shape1_9 = .AddShape(msoShapeRectangle, 516.96, 65.52, 178.56, 16.56)
End With
With Shape1_9.Fill
.Solid
.ForeColor.RGB = RGB(135, 137, 139)
End With
Shape1_9.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "Key Insights"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(9).Shapes
Set Shape2_9 = .AddShape(msoShapeRectangle, 516.52, 64.8, 178.56, 288)
End With
With Shape2_9.Fill
.Solid
.ForeColor.RGB = RGB(255, 255, 255)
End With
Shape2_9.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Line.Weight = 1.5
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineThickBetweenThin
.Line.ForeColor.RGB = RGB(135, 137, 139)
End With
Shape2_9.Select
newPowerPoint.ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBack
With newPowerPoint.ActivePresentation.Slides(9).Shapes
Set Shape3_9 = .AddShape(msoShapeRectangle, 30.24, 66.96, 396, 15.84)
End With
With Shape3_9.Fill
.Solid
.ForeColor.RGB = RGB(0, 150, 214)
End With
Shape3_9.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "VoC FY12 to FY13"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(9).Shapes
Set Shape4_9 = .AddShape(msoShapeRectangle, 30.24, 270, 396, 15.84)
End With
With Shape4_9.Fill
.Solid
.ForeColor.RGB = RGB(0, 150, 214)
End With
Shape4_9.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "Accounts Classified As Red This Quarter"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
ThisWorkbook.Sheets("6.Voice&Pulse").Range("B31:I35").Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActiveWindow.View.Paste
Application.CutCopyMode = False
activeSlide.Shapes(7).Select
Visible = True
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Left = 0.42 * Factor
.Top = 4.04 * Factor
.Height = 1.19 * Factor
.Width = 5.5 * Factor
End With
ThisWorkbook.Sheets("6.Voice&Pulse").Shapes("Object 249").Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActiveWindow.View.Paste
Application.CutCopyMode = False
activeSlide.Shapes("Object 249").Select
Visible = True
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Left = 0.42 * Factor
.Top = 1.15 * Factor
.Height = 2.33 * Factor
.Width = 5.5 * Factor
End With
Set activeSlide = Nothing
Set Shape1_9 = Nothing
Set Shape2_9 = Nothing
Set Shape3_9 = Nothing
Set Shape4_9 = Nothing
Application.ScreenUpdating = True
MsgBox "Your PPT is Ready, SEA Review Tempate is ready for your review", vbInformation
End With
End SubSub CreatePowerPoint()
Application.ScreenUpdating = False
'Macro Created by Pallavi NC (pallavi.nc@hp.com)
'Add a reference to the Microsoft PowerPoint Library by:
'1. Go to Tools in the VBA menu
'2. Click on Reference
'3. Scroll down to Microsoft PowerPoint X.0 Object Library, check the box, and press Okay
'First we declare the variables we will be using
Dim newPowerPoint As PowerPoint.Application
Dim activeSlide As PowerPoint.Slide
Dim cht As Excel.ChartObject
Dim oPPTFile As PowerPoint.Presentation
Dim wb As Workbook
Dim Shape1 As Object
Dim Shape2 As Object
Dim Shape3 As Object
Dim Shape1_4 As Object
Dim Shape2_4 As Object
Dim Shape1_5 As Object
Dim Shape2_5 As Object
Dim Shape3_5 As Object
Dim Shape4_5 As Object
Dim Shape1_7 As Object
Dim Shape2_7 As Object
Dim Shape3_7 As Object
Dim Shape4_7 As Object
Dim Shape5_7 As Object
Dim Shape6_7 As Object
Dim Shape7_7 As Object
Dim Shape8_7 As Object
Dim Shape1_8 As Object
Dim Shape2_8 As Object
Dim Shape3_8 As Object
Dim Shape4_8 As Object
Dim Shape5_8 As Object
Dim Shape6_8 As Object
Dim Shape1_9 As Object
Dim Shape2_9 As Object
Dim Shape3_9 As Object
Dim Shape4_9 As Object
Dim c As Range
Dim lngRow As Long
Dim lngCol As Long
Dim objTable As Table
Dim strTemplate As String
Dim x As Long
Const Factor As Integer = 72
Set wb = ThisWorkbook
'Look for existing instance
On Error Resume Next
Set newPowerPoint = GetObject(, "PowerPoint.Application")
On Error GoTo 0
strTemplate = InputBox("Please enter the folder where the Template is saved", "Path to Open HP Simplified Template", "Enter in the following format (C:\Users\ncp\Desktop\Cadnce\HP_PPT_Standard_16x9.potx)")
'Let's create a new PowerPoint
If newPowerPoint Is Nothing Then
Set newPowerPoint = New PowerPoint.Application
End If
'Show the PowerPoint
newPowerPoint.Visible = True
newPowerPoint.Presentations.Open strTemplate, untitled:=msoTrue
For x = newPowerPoint.ActivePresentation.Slides.Count To 1 Step -1
newPowerPoint.ActivePresentation.Slides(x).Delete
Next x
'Apply Powerpoint Layout
Filename = InputBox("Please enter the folder where the file will be saved with the filename", "Filename and Folder Path", "Enter in the following format (C:\Users\ncp\Desktop\Cadnce\SEA-Review-August'13.pptx)")
Set oPPTFile = newPowerPoint.ActivePresentation
oPPTFile.SaveAs Filename
'Add the title slide
Set activeSlide = oPPTFile.Slides.Add(1, ppLayoutCustom)
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 10, 20, 300, 5
activeSlide.Shapes(1).TextFrame.TextRange.Text = "SEA Business Review"
newText = InputBox("Please enter the month and year in following format (August 2013)")
activeSlide.Shapes(2).TextFrame.TextRange.Text = newText
Set activeSlide = Nothing
'Add Slide 2
Set activeSlide = oPPTFile.Slides.Add(2, ppLayoutBlank)
ThisWorkbook.Sheets("Slide1").Shapes("Picture 5").Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActivePresentation.Slides(2).Shapes.Paste.Select
Visible = True
Application.CutCopyMode = False
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Height = 0.5 * Factor
.Width = 0.5 * Factor
.Left = 0.16 * Factor
.Top = 0.28 * Factor
End With
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 59.76, 13.68, 372.96, 36.72
activeSlide.Shapes(2).TextFrame.TextRange.Text = "Enterprise Services Scorecard "
activeSlide.Shapes(2).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 24
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Name = "HP Simplified"
.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
End With
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 414.72, 16.56, 36.72, 32.4
activeSlide.Shapes(3).TextFrame.TextRange.Text = "½"
activeSlide.Shapes(3).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 24
.TextFrame.TextRange.Font.Bold = msoFalse
.TextFrame.TextRange.Font.Name = "Symbol"
.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
End With
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 430.56, 16.56, 64.08, 36.72
activeSlide.Shapes(4).TextFrame.TextRange.Text = "SEA"
activeSlide.Shapes(4).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 24
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Name = "HP Simplified"
.TextFrame.TextRange.Font.Color.RGB = RGB(0, 150, 214)
End With
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 59.76, 38.8, 97.92, 36.72
activeSlide.Shapes(5).TextFrame.TextRange.Text = InputBox("Please enter the month in the following format (August)")
activeSlide.Shapes(5).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 24
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Name = "HP Simplified"
.TextFrame.TextRange.Font.Color.RGB = RGB(127, 127, 127)
End With
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 571.68, 0, 148.32, 21.6
activeSlide.Shapes(6).TextFrame.TextRange.Text = "EXECUTIVE SUMMARY"
activeSlide.Shapes(6).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 12
.TextFrame.TextRange.Font.Bold = msoFalse
.TextFrame.TextRange.Font.Name = "HP Simplified (Body)"
.TextFrame.TextRange.Font.Color.RGB = RGB(127, 127, 127)
End With
ThisWorkbook.Sheets("Slide1").Range("U10:V13").Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActiveWindow.View.Paste
Application.CutCopyMode = False
activeSlide.Shapes(7).Select
Visible = True
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Left = 7.13 * Factor
.Top = 0.27 * Factor
.Height = 0.74 * Factor
.Width = 2.8 * Factor
End With
With newPowerPoint.ActivePresentation.Slides(2).Shapes
Set Shape1 = .AddShape(msoShapeRectangle, 576.72, 80.64, 129.6, 17.28)
End With
With Shape1.Fill
.Solid
.ForeColor.RGB = RGB(135, 137, 139)
End With
Shape1.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "Key Insights"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(2).Shapes
Set Shape2 = .AddShape(msoShapeRectangle, 576.72, 81.36, 129.6, 313.92)
End With
With Shape2.Fill
.Visible = msoFalse
End With
Shape2.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Line.Weight = 1.5
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineThickBetweenThin
.Line.ForeColor.RGB = RGB(135, 137, 139)
End With
With newPowerPoint.ActivePresentation.Slides(2).Shapes
Set Shape3 = .AddShape(msoShapeRectangle, 40.32, 347.04, 663.84, 51.12)
End With
With Shape3.Fill
.Solid
.ForeColor.RGB = RGB(255, 255, 255)
End With
Shape3.Select
newPowerPoint.ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBack
ThisWorkbook.Sheets("Slide1").Range("B8:R28").Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActiveWindow.View.Paste
activeSlide.Shapes(11).Select
Application.CutCopyMode = False
Visible = True
Set objTable = newPowerPoint.ActiveWindow.Selection.ShapeRange.Table
For lngRow = 1 To objTable.Rows.Count
For lngCol = 1 To objTable.Columns.Count
If objTable.Rows(lngRow).Cells(lngCol).Selected Then
With objTable.Rows(lngRow).Cells(lngCol).Shape.TextFrame.TextRange.Font
.Size = 7
End With
End If
Next
Next
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Left = 0.16 * Factor
.Top = 1.12 * Factor
.Height = 3.7 * Factor
.Width = 7.78 * Factor
End With
Set activeSlide = Nothing
Set Shape1 = Nothing
Set Shape2 = Nothing
Set Shape3 = Nothing
'Add Slide 3
Set activeSlide = oPPTFile.Slides.Add(3, ppLayoutBlank)
newPowerPoint.ActivePresentation.Slides(3).CustomLayout = newPowerPoint.ActivePresentation.Designs(1).SlideMaster.CustomLayouts(3)
activeSlide.Shapes(1).TextFrame.TextRange.Text = "Sales"
activeSlide.Shapes(2).Delete
'Add Slide 4
Set activeSlide = oPPTFile.Slides.Add(4, ppLayoutBlank)
activeSlide.Select
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 12.24, 18.72, 364.32, 33.84
activeSlide.Shapes(1).TextFrame.TextRange.Text = "Overall sales performance"
activeSlide.Shapes(1).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 28
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Name = "HP Simplified"
.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
End With
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 661.68, 2.16, 44.64, 14.4
activeSlide.Shapes(2).TextFrame.TextRange.Text = "SALES"
activeSlide.Shapes(2).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 12
.TextFrame.TextRange.Font.Bold = msoFalse
.TextFrame.TextRange.Font.Name = "HP Simplified (Body)"
.TextFrame.TextRange.Font.Color.RGB = RGB(135, 137, 139)
End With
ThisWorkbook.Sheets("Slide2").Range("X21:X24").Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActiveWindow.View.Paste
Application.CutCopyMode = False
activeSlide.Shapes(3).Select
Visible = True
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Left = 8.67 * Factor
.Top = 0.23 * Factor
.Height = 0.72 * Factor
.Width = 1.28 * Factor
End With
With newPowerPoint.ActivePresentation.Slides(4).Shapes
Set Shape1_4 = .AddShape(msoShapeRectangle, 591.12, 73.44, 108.72, 17.28)
End With
With Shape1_4.Fill
.Solid
.ForeColor.RGB = RGB(135, 137, 139)
End With
Shape1_4.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "Key Insights"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(4).Shapes
Set Shape2_4 = .AddShape(msoShapeRectangle, 591.12, 73.44, 108.72, 283.68)
End With
With Shape2_4.Fill
.Visible = msoFalse
End With
Shape2_4.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Line.Weight = 1.5
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineThickBetweenThin
.Line.ForeColor.RGB = RGB(135, 137, 139)
End With
ThisWorkbook.Sheets("Slide2").Range("B8:R20").Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActiveWindow.View.Paste
Application.CutCopyMode = False
activeSlide.Shapes(6).Select
Visible = True
Set objTable = newPowerPoint.ActiveWindow.Selection.ShapeRange.Table
For lngRow = 1 To objTable.Rows.Count
For lngCol = 1 To objTable.Columns.Count
If objTable.Rows(lngRow).Cells(lngCol).Selected Then
With objTable.Rows(lngRow).Cells(lngCol).Shape.TextFrame.TextRange.Font
.Name = "HP Simplified"
.Size = 10
End With
End If
Next
Next
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Left = 0.17 * Factor
.Top = 1.01 * Factor
.Height = 3.92 * Factor
.Width = 7.95 * Factor
End With
Set activeSlide = Nothing
Set Shape1_4 = Nothing
Set Shape2_4 = Nothing
'Add Slide 5
Set activeSlide = oPPTFile.Slides.Add(5, ppLayoutBlank)
activeSlide.Select
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 16.56, 15.12, 496.08, 33.84
activeSlide.Shapes(1).TextFrame.TextRange.Text = "Win rate trends and top deals/losses"
activeSlide.Shapes(1).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 28
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Name = "HP Simplified"
.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
End With
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 661.68, 2.16, 44.64, 14.4
activeSlide.Shapes(2).TextFrame.TextRange.Text = "SALES"
activeSlide.Shapes(2).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 12
.TextFrame.TextRange.Font.Bold = msoFalse
.TextFrame.TextRange.Font.Name = "HP Simplified (Body)"
.TextFrame.TextRange.Font.Color.RGB = RGB(135, 137, 139)
End With
ThisWorkbook.Sheets("3.Win rate trends").Shapes("Group 1").Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActiveWindow.View.Paste
Application.CutCopyMode = False
activeSlide.Shapes(3).Select
Visible = True
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Left = 0.2 * Factor
.Top = 0.73 * Factor
.Height = 2.84 * Factor
.Width = 4.09 * Factor
End With
With newPowerPoint.ActivePresentation.Slides(5).Shapes
Set Shape1_5 = .AddShape(msoShapeRectangle, 316.08, 54, 389.52, 14.4)
End With
With Shape1_5.Fill
.Solid
.ForeColor.RGB = RGB(0, 150, 214)
End With
Shape1_5.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "Top 5 Deals/Losses This Month"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(5).Shapes
Set Shape2_5 = .AddShape(msoShapeRectangle, 316.08, 53.28, 389.52, 204.48)
End With
With Shape2_5.Fill
.Visible = msoFalse
End With
Shape2_5.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Line.Weight = 1.5
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineThickBetweenThin
.Line.ForeColor.RGB = RGB(0, 150, 214)
ThisWorkbook.Worksheets("3.Win rate trends").Activate
ThisWorkbook.Sheets("3.Win rate trends").Range("J5:O16").Copy
ActiveSheet.Range("J22").Select
ActiveSheet.Paste
ActiveSheet.Range("P23:P33").Select
For Each c In Range("P23:P33")
If c.Value = 0 Then
c.EntireRow.Hidden = True
Else
c.EntireRow.Hidden = False
End If
Next c
ActiveSheet.Range("J22:O33").Cells.SpecialCells(xlCellTypeVisible).Select
Selection.Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActiveWindow.View.Paste
Application.CutCopyMode = False
ThisWorkbook.Sheets("3.Win rate trends").Range("J22:O33").EntireRow.Hidden = False
ThisWorkbook.Sheets("3.Win rate trends").Range("J22:O33").ClearContents
activeSlide.Shapes(6).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Left = 4.42 * Factor
.Top = 0.99 * Factor
.Height = 2.5 * Factor
.Width = 5.33 * Factor
End With
With newPowerPoint.ActivePresentation.Slides(5).Shapes
Set Shape3_5 = .AddShape(msoShapeRectangle, 12.24, 274.32, 691.2, 23.76)
End With
With Shape3_5.Fill
.Solid
.ForeColor.RGB = RGB(135, 137, 139)
End With
Shape3_5.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "Key Insights"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(5).Shapes
Set Shape4_5 = .AddShape(msoShapeRectangle, 12.24, 274.32, 691.2, 113.76)
End With
With Shape4_5.Fill
.Solid
.ForeColor.RGB = RGB(255, 255, 255)
End With
Shape4_5.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Line.Weight = 1.5
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineThickBetweenThin
.Line.ForeColor.RGB = RGB(135, 137, 139)
End With
Shape4_5.Select
newPowerPoint.ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBack
Set activeSlide = Nothing
Set Shape1_5 = Nothing
Set Shape2_5 = Nothing
Set Shape3_5 = Nothing
Set Shape4_5 = Nothing
'Add Slide 6
Set activeSlide = oPPTFile.Slides.Add(6, ppLayoutBlank)
newPowerPoint.ActivePresentation.Slides(6).CustomLayout = newPowerPoint.ActivePresentation.Designs(1).SlideMaster.CustomLayouts(3)
activeSlide.Shapes(1).TextFrame.TextRange.Text = "Service Quality"
activeSlide.Shapes(2).Delete
Set activeSlide = Nothing
'Add Slide 7
Set activeSlide = oPPTFile.Slides.Add(7, ppLayoutBlank)
activeSlide.Select
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 9.36, 18, 341.28, 33.84
activeSlide.Shapes(1).TextFrame.TextRange.Text = "Quality dashboard - SEA"
activeSlide.Shapes(1).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 28
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Name = "HP Simplified"
.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
End With
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 606.24, 2.16, 110.16, 14.4
activeSlide.Shapes(2).TextFrame.TextRange.Text = "SERVICE QUALITY"
activeSlide.Shapes(2).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 12
.TextFrame.TextRange.Font.Bold = msoFalse
.TextFrame.TextRange.Font.Name = "HP Simplified (Body)"
.TextFrame.TextRange.Font.Color.RGB = RGB(135, 137, 139)
End With
With newPowerPoint.ActivePresentation.Slides(7).Shapes
Set Shape1_7 = .AddShape(msoShapeRectangle, 558, 54, 149.76, 18)
End With
With Shape1_7.Fill
.Solid
.ForeColor.RGB = RGB(135, 137, 139)
End With
Shape1_7.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "Key Insights"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(7).Shapes
Set Shape2_7 = .AddShape(msoShapeRectangle, 558, 54, 149.76, 334.8)
End With
With Shape2_7.Fill
.Solid
.ForeColor.RGB = RGB(255, 255, 255)
End With
Shape2_7.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Line.Weight = 1.5
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineThickBetweenThin
.Line.ForeColor.RGB = RGB(135, 137, 139)
End With
Shape2_7.Select
newPowerPoint.ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBack
With newPowerPoint.ActivePresentation.Slides(7).Shapes
Set Shape3_7 = .AddShape(msoShapeRectangle, 9.36, 54, 266.4, 17.28)
End With
With Shape3_7.Fill
.Solid
.ForeColor.RGB = RGB(0, 150, 214)
End With
Shape3_7.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "SLA Performance"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(7).Shapes
Set Shape4_7 = .AddShape(msoShapeRectangle, 9.36, 54, 266.4, 165.6)
End With
With Shape4_7.Fill
.Visible = msoFalse
End With
Shape4_7.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Line.Weight = 1.5
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineThickBetweenThin
.Line.ForeColor.RGB = RGB(0, 150, 214)
End With
With newPowerPoint.ActivePresentation.Slides(7).Shapes
Set Shape5_7 = .AddShape(msoShapeRectangle, 285.12, 53.28, 266.4, 17.28)
End With
With Shape5_7.Fill
.Solid
.ForeColor.RGB = RGB(0, 150, 214)
End With
Shape5_7.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "P1 Trends"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(7).Shapes
Set Shape6_7 = .AddShape(msoShapeRectangle, 285.12, 53.28, 266.4, 165.6)
End With
With Shape6_7.Fill
.Visible = msoFalse
End With
Shape6_7.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Line.Weight = 1.5
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineThickBetweenThin
.Line.ForeColor.RGB = RGB(0, 150, 214)
End With
With newPowerPoint.ActivePresentation.Slides(7).Shapes
Set Shape7_7 = .AddShape(msoShapeRectangle, 9.36, 223.92, 266.4, 17.28)
End With
With Shape7_7.Fill
.Solid
.ForeColor.RGB = RGB(0, 150, 214)
End With
Shape7_7.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "P1 MTTR trends"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(7).Shapes
Set Shape8_7 = .AddShape(msoShapeRectangle, 9.36, 223.92, 266.4, 147.6)
End With
With Shape8_7.Fill
.Visible = msoFalse
End With
Shape8_7.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Line.Weight = 1.5
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineThickBetweenThin
.Line.ForeColor.RGB = RGB(0, 150, 214)
End With
ThisWorkbook.Sheets("5a.Quality dashboard1").Shapes("Chart 1").Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActiveWindow.View.Paste
Application.CutCopyMode = False
activeSlide.Shapes(11).Select
Visible = True
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Left = 0.23 * Factor
.Top = 1.2 * Factor
.Height = 1.8 * Factor
.Width = 3.2 * Factor
End With
ThisWorkbook.Sheets("5a.Quality dashboard1").Shapes("Object 1702").Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActiveWindow.View.Paste
Application.CutCopyMode = False
activeSlide.Shapes("Object 1702").Select
Visible = True
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Left = 4.02 * Factor
.Top = 1.09 * Factor
.Height = 1.9 * Factor
.Width = 3.23 * Factor
End With
Set activeSlide = Nothing
Set Shape1_7 = Nothing
Set Shape2_7 = Nothing
Set Shape3_7 = Nothing
Set Shape4_7 = Nothing
Set Shape5_7 = Nothing
Set Shape6_7 = Nothing
Set Shape7_7 = Nothing
Set Shape8_7 = Nothing
'Add Slide 8
Set activeSlide = oPPTFile.Slides.Add(8, ppLayoutBlank)
activeSlide.Select
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 33.12, 18.72, 340.56, 33.84
activeSlide.Shapes(1).TextFrame.TextRange.Text = "Quality dashboard - SEA"
activeSlide.Shapes(1).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 28
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Name = "HP Simplified"
.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
End With
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 606.24, 2.16, 110.16, 14.4
activeSlide.Shapes(2).TextFrame.TextRange.Text = "SERVICE QUALITY"
activeSlide.Shapes(2).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 12
.TextFrame.TextRange.Font.Bold = msoFalse
.TextFrame.TextRange.Font.Name = "HP Simplified (Body)"
.TextFrame.TextRange.Font.Color.RGB = RGB(135, 137, 139)
End With
With newPowerPoint.ActivePresentation.Slides(8).Shapes
Set Shape1_8 = .AddShape(msoShapeRectangle, 486, 52.56, 216, 18)
End With
With Shape1_8.Fill
.Solid
.ForeColor.RGB = RGB(135, 137, 139)
End With
Shape1_8.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "Key Insights"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(8).Shapes
Set Shape2_8 = .AddShape(msoShapeRectangle, 486, 52.56, 216, 334.8)
End With
With Shape2_8.Fill
.Solid
.ForeColor.RGB = RGB(255, 255, 255)
End With
Shape2_8.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Line.Weight = 1.5
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineThickBetweenThin
.Line.ForeColor.RGB = RGB(135, 137, 139)
End With
Shape2_8.Select
newPowerPoint.ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBack
With newPowerPoint.ActivePresentation.Slides(8).Shapes
Set Shape3_8 = .AddShape(msoShapeRectangle, 33.84, 54, 425.52, 16.56)
End With
With Shape3_8.Fill
.Solid
.ForeColor.RGB = RGB(0, 150, 214)
End With
Shape3_8.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "Red Projects Trends"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(8).Shapes
Set Shape4_8 = .AddShape(msoShapeRectangle, 33.84, 53.28, 425.52, 161.28)
End With
With Shape4_8.Fill
.Visible = msoFalse
End With
Shape4_8.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Line.Weight = 1.5
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineThickBetweenThin
.Line.ForeColor.RGB = RGB(0, 150, 214)
End With
With newPowerPoint.ActivePresentation.Slides(8).Shapes
Set Shape5_8 = .AddShape(msoShapeRectangle, 35.28, 226.8, 425.52, 16.56)
End With
With Shape5_8.Fill
.Solid
.ForeColor.RGB = RGB(0, 150, 214)
End With
Shape5_8.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "Red/Amber Projects By Sub-Region"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(8).Shapes
Set Shape6_8 = .AddShape(msoShapeRectangle, 34.56, 226.8, 425.52, 161.28)
End With
With Shape6_8.Fill
.Solid
.ForeColor.RGB = RGB(255, 255, 255)
End With
Shape6_8.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Line.Weight = 1.5
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineThickBetweenThin
.Line.ForeColor.RGB = RGB(0, 150, 214)
End With
ThisWorkbook.Sheets("5b.Quality dashboard2").Shapes("Object 275").Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActiveWindow.View.Paste
Application.CutCopyMode = False
activeSlide.Shapes("Object 275").Select
Visible = True
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Left = 0.58 * Factor
.Top = 1.04 * Factor
.Height = 1.84 * Factor
.Width = 5.69 * Factor
End With
ThisWorkbook.Sheets("5b.Quality dashboard2").Shapes("Object 274").Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActiveWindow.View.Paste
activeSlide.Shapes("Object 274").Select
Application.CutCopyMode = False
Visible = True
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Left = 0.57 * Factor
.Top = 3.42 * Factor
.Height = 1.93 * Factor
.Width = 5.67 * Factor
End With
Set activeSlide = Nothing
Set Shape1_8 = Nothing
Set Shape2_8 = Nothing
Set Shape3_8 = Nothing
Set Shape4_8 = Nothing
Set Shape5_8 = Nothing
Set Shape6_8 = Nothing
'Add Slide 9
Set activeSlide = oPPTFile.Slides.Add(9, ppLayoutBlank)
activeSlide.Select
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 25.92, 18.72, 396.72, 33.84
activeSlide.Shapes(1).TextFrame.TextRange.Text = "Voice and Pulse of the Client"
activeSlide.Shapes(1).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 28
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Name = "HP Simplified"
.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
End With
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 606.24, 2.16, 110.16, 14.4
activeSlide.Shapes(2).TextFrame.TextRange.Text = "SERVICE QUALITY"
activeSlide.Shapes(2).Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Font.Size = 12
.TextFrame.TextRange.Font.Bold = msoFalse
.TextFrame.TextRange.Font.Name = "HP Simplified (Body)"
.TextFrame.TextRange.Font.Color.RGB = RGB(135, 137, 139)
End With
With newPowerPoint.ActivePresentation.Slides(9).Shapes
Set Shape1_9 = .AddShape(msoShapeRectangle, 516.96, 65.52, 178.56, 16.56)
End With
With Shape1_9.Fill
.Solid
.ForeColor.RGB = RGB(135, 137, 139)
End With
Shape1_9.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "Key Insights"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(9).Shapes
Set Shape2_9 = .AddShape(msoShapeRectangle, 516.52, 64.8, 178.56, 288)
End With
With Shape2_9.Fill
.Solid
.ForeColor.RGB = RGB(255, 255, 255)
End With
Shape2_9.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Line.Weight = 1.5
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineThickBetweenThin
.Line.ForeColor.RGB = RGB(135, 137, 139)
End With
Shape2_9.Select
newPowerPoint.ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBack
With newPowerPoint.ActivePresentation.Slides(9).Shapes
Set Shape3_9 = .AddShape(msoShapeRectangle, 30.24, 66.96, 396, 15.84)
End With
With Shape3_9.Fill
.Solid
.ForeColor.RGB = RGB(0, 150, 214)
End With
Shape3_9.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "VoC FY12 to FY13"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
With newPowerPoint.ActivePresentation.Slides(9).Shapes
Set Shape4_9 = .AddShape(msoShapeRectangle, 30.24, 270, 396, 15.84)
End With
With Shape4_9.Fill
.Solid
.ForeColor.RGB = RGB(0, 150, 214)
End With
Shape4_9.Select
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.TextFrame.TextRange.Text = "Accounts Classified As Red This Quarter"
.TextFrame.TextRange.Font.Size = 10
.TextFrame.TextRange.Font.Name = "HP Simplified(Body)"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
End With
ThisWorkbook.Sheets("6.Voice&Pulse").Range("B31:I35").Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActiveWindow.View.Paste
Application.CutCopyMode = False
activeSlide.Shapes(7).Select
Visible = True
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Left = 0.42 * Factor
.Top = 4.04 * Factor
.Height = 1.19 * Factor
.Width = 5.5 * Factor
End With
ThisWorkbook.Sheets("6.Voice&Pulse").Shapes("Object 249").Copy
newPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndex
newPowerPoint.ActiveWindow.View.Paste
Application.CutCopyMode = False
activeSlide.Shapes("Object 249").Select
Visible = True
With newPowerPoint.ActiveWindow.Selection.ShapeRange
.Left = 0.42 * Factor
.Top = 1.15 * Factor
.Height = 2.33 * Factor
.Width = 5.5 * Factor
End With
Set activeSlide = Nothing
Set Shape1_9 = Nothing
Set Shape2_9 = Nothing
Set Shape3_9 = Nothing
Set Shape4_9 = Nothing
Application.ScreenUpdating = True
MsgBox "Your PPT is Ready, SEA Review Tempate is ready for your review", vbInformation
End With
End Sub
thanks
Pallavi