Excel error VBA 462 remote server not found

pallavinc

New Member
Joined
Sep 9, 2009
Messages
5
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.

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
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Re: Excel error VBA 462 remote server not found- urgent...

Please help I need to deliver this by Monday
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.
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 usingDim newPowerPoint As PowerPoint.ApplicationDim activeSlide As PowerPoint.SlideDim cht As Excel.ChartObjectDim oPPTFile As PowerPoint.PresentationDim wb As WorkbookDim Shape1 As ObjectDim Shape2 As ObjectDim Shape3 As ObjectDim Shape1_4 As ObjectDim Shape2_4 As ObjectDim Shape1_5 As ObjectDim Shape2_5 As ObjectDim Shape3_5 As ObjectDim Shape4_5 As ObjectDim Shape1_7 As ObjectDim Shape2_7 As ObjectDim Shape3_7 As ObjectDim Shape4_7 As ObjectDim Shape5_7 As ObjectDim Shape6_7 As ObjectDim Shape7_7 As ObjectDim Shape8_7 As ObjectDim Shape1_8 As ObjectDim Shape2_8 As ObjectDim Shape3_8 As ObjectDim Shape4_8 As ObjectDim Shape5_8 As ObjectDim Shape6_8 As ObjectDim Shape1_9 As ObjectDim Shape2_9 As ObjectDim Shape3_9 As ObjectDim Shape4_9 As ObjectDim c As RangeDim lngRow As LongDim lngCol As LongDim objTable As TableDim strTemplate As StringDim x As LongConst Factor As Integer = 72Set wb = ThisWorkbook'Look for existing instanceOn Error Resume NextSet newPowerPoint = GetObject(, "PowerPoint.Application")On Error GoTo 0strTemplate = 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 PowerPointIf newPowerPoint Is Nothing ThenSet newPowerPoint = New PowerPoint.ApplicationEnd If'Show the PowerPointnewPowerPoint.Visible = TruenewPowerPoint.Presentations.Open strTemplate, untitled:=msoTrueFor x = newPowerPoint.ActivePresentation.Slides.Count To 1 Step -1newPowerPoint.ActivePresentation.Slides(x).DeleteNext x'Apply Powerpoint LayoutFilename = 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.ActivePresentationoPPTFile.SaveAs Filename'Add the title slideSet activeSlide = oPPTFile.Slides.Add(1, ppLayoutCustom)activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 10, 20, 300, 5activeSlide.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 = newTextSet activeSlide = Nothing'Add Slide 2Set activeSlide = oPPTFile.Slides.Add(2, ppLayoutBlank)ThisWorkbook.Sheets("Slide1").Shapes("Picture 5").CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActivePresentation.Slides(2).Shapes.Paste.SelectVisible = TrueApplication.CutCopyMode = FalseWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Height = 0.5 * Factor.Width = 0.5 * Factor.Left = 0.16 * Factor.Top = 0.28 * FactorEnd WithactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 59.76, 13.68, 372.96, 36.72activeSlide.Shapes(2).TextFrame.TextRange.Text = "Enterprise Services Scorecard "activeSlide.Shapes(2).SelectWith 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 WithactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 414.72, 16.56, 36.72, 32.4activeSlide.Shapes(3).TextFrame.TextRange.Text = "½"activeSlide.Shapes(3).SelectWith 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 WithactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 430.56, 16.56, 64.08, 36.72activeSlide.Shapes(4).TextFrame.TextRange.Text = "SEA"activeSlide.Shapes(4).SelectWith 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 WithactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 59.76, 38.8, 97.92, 36.72activeSlide.Shapes(5).TextFrame.TextRange.Text = InputBox("Please enter the month in the following format (August)")activeSlide.Shapes(5).SelectWith 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 WithactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 571.68, 0, 148.32, 21.6activeSlide.Shapes(6).TextFrame.TextRange.Text = "EXECUTIVE SUMMARY"activeSlide.Shapes(6).SelectWith 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 WithThisWorkbook.Sheets("Slide1").Range("U10:V13").CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActiveWindow.View.PasteApplication.CutCopyMode = FalseactiveSlide.Shapes(7).SelectVisible = TrueWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 7.13 * Factor.Top = 0.27 * Factor.Height = 0.74 * Factor.Width = 2.8 * FactorEnd WithWith newPowerPoint.ActivePresentation.Slides(2).ShapesSet Shape1 = .AddShape(msoShapeRectangle, 576.72, 80.64, 129.6, 17.28)End WithWith Shape1.Fill.Solid.ForeColor.RGB = RGB(135, 137, 139)End WithShape1.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(2).ShapesSet Shape2 = .AddShape(msoShapeRectangle, 576.72, 81.36, 129.6, 313.92)End WithWith Shape2.Fill.Visible = msoFalseEnd WithShape2.SelectWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Line.Weight = 1.5.Line.DashStyle = msoLineSolid.Line.Style = msoLineThickBetweenThin.Line.ForeColor.RGB = RGB(135, 137, 139)End WithWith newPowerPoint.ActivePresentation.Slides(2).ShapesSet Shape3 = .AddShape(msoShapeRectangle, 40.32, 347.04, 663.84, 51.12)End WithWith Shape3.Fill.Solid.ForeColor.RGB = RGB(255, 255, 255)End WithShape3.SelectnewPowerPoint.ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBackThisWorkbook.Sheets("Slide1").Range("B8:R28").CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActiveWindow.View.PasteactiveSlide.Shapes(11).SelectApplication.CutCopyMode = FalseVisible = TrueSet objTable = newPowerPoint.ActiveWindow.Selection.ShapeRange.TableFor lngRow = 1 To objTable.Rows.CountFor lngCol = 1 To objTable.Columns.CountIf objTable.Rows(lngRow).Cells(lngCol).Selected ThenWith objTable.Rows(lngRow).Cells(lngCol).Shape.TextFrame.TextRange.Font.Size = 7End WithEnd IfNextNextWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 0.16 * Factor.Top = 1.12 * Factor.Height = 3.7 * Factor.Width = 7.78 * FactorEnd WithSet activeSlide = NothingSet Shape1 = NothingSet Shape2 = NothingSet Shape3 = Nothing'Add Slide 3Set 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 4Set activeSlide = oPPTFile.Slides.Add(4, ppLayoutBlank)activeSlide.SelectactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 12.24, 18.72, 364.32, 33.84activeSlide.Shapes(1).TextFrame.TextRange.Text = "Overall sales performance"activeSlide.Shapes(1).SelectWith 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 WithactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 661.68, 2.16, 44.64, 14.4activeSlide.Shapes(2).TextFrame.TextRange.Text = "SALES"activeSlide.Shapes(2).SelectWith 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 WithThisWorkbook.Sheets("Slide2").Range("X21:X24").CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActiveWindow.View.PasteApplication.CutCopyMode = FalseactiveSlide.Shapes(3).SelectVisible = TrueWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 8.67 * Factor.Top = 0.23 * Factor.Height = 0.72 * Factor.Width = 1.28 * FactorEnd WithWith newPowerPoint.ActivePresentation.Slides(4).ShapesSet Shape1_4 = .AddShape(msoShapeRectangle, 591.12, 73.44, 108.72, 17.28)End WithWith Shape1_4.Fill.Solid.ForeColor.RGB = RGB(135, 137, 139)End WithShape1_4.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(4).ShapesSet Shape2_4 = .AddShape(msoShapeRectangle, 591.12, 73.44, 108.72, 283.68)End WithWith Shape2_4.Fill.Visible = msoFalseEnd WithShape2_4.SelectWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Line.Weight = 1.5.Line.DashStyle = msoLineSolid.Line.Style = msoLineThickBetweenThin.Line.ForeColor.RGB = RGB(135, 137, 139)End WithThisWorkbook.Sheets("Slide2").Range("B8:R20").CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActiveWindow.View.PasteApplication.CutCopyMode = FalseactiveSlide.Shapes(6).SelectVisible = TrueSet objTable = newPowerPoint.ActiveWindow.Selection.ShapeRange.TableFor lngRow = 1 To objTable.Rows.CountFor lngCol = 1 To objTable.Columns.CountIf objTable.Rows(lngRow).Cells(lngCol).Selected ThenWith objTable.Rows(lngRow).Cells(lngCol).Shape.TextFrame.TextRange.Font.Name = "HP Simplified".Size = 10End WithEnd IfNextNextWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 0.17 * Factor.Top = 1.01 * Factor.Height = 3.92 * Factor.Width = 7.95 * FactorEnd WithSet activeSlide = NothingSet Shape1_4 = NothingSet Shape2_4 = Nothing'Add Slide 5Set activeSlide = oPPTFile.Slides.Add(5, ppLayoutBlank)activeSlide.SelectactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 16.56, 15.12, 496.08, 33.84activeSlide.Shapes(1).TextFrame.TextRange.Text = "Win rate trends and top deals/losses"activeSlide.Shapes(1).SelectWith 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 WithactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 661.68, 2.16, 44.64, 14.4activeSlide.Shapes(2).TextFrame.TextRange.Text = "SALES"activeSlide.Shapes(2).SelectWith 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 WithThisWorkbook.Sheets("3.Win rate trends").Shapes("Group 1").CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActiveWindow.View.PasteApplication.CutCopyMode = FalseactiveSlide.Shapes(3).SelectVisible = TrueWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 0.2 * Factor.Top = 0.73 * Factor.Height = 2.84 * Factor.Width = 4.09 * FactorEnd WithWith newPowerPoint.ActivePresentation.Slides(5).ShapesSet Shape1_5 = .AddShape(msoShapeRectangle, 316.08, 54, 389.52, 14.4)End WithWith Shape1_5.Fill.Solid.ForeColor.RGB = RGB(0, 150, 214)End WithShape1_5.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(5).ShapesSet Shape2_5 = .AddShape(msoShapeRectangle, 316.08, 53.28, 389.52, 204.48)End WithWith Shape2_5.Fill.Visible = msoFalseEnd WithShape2_5.SelectWith 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").ActivateThisWorkbook.Sheets("3.Win rate trends").Range("J5:O16").CopyActiveSheet.Range("J22").SelectActiveSheet.PasteActiveSheet.Range("P23:P33").SelectFor Each c In Range("P23:P33")If c.Value = 0 Thenc.EntireRow.Hidden = TrueElsec.EntireRow.Hidden = FalseEnd IfNext cActiveSheet.Range("J22:O33").Cells.SpecialCells(xlCellTypeVisible).SelectSelection.CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActiveWindow.View.PasteApplication.CutCopyMode = FalseThisWorkbook.Sheets("3.Win rate trends").Range("J22:O33").EntireRow.Hidden = FalseThisWorkbook.Sheets("3.Win rate trends").Range("J22:O33").ClearContentsactiveSlide.Shapes(6).SelectWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 4.42 * Factor.Top = 0.99 * Factor.Height = 2.5 * Factor.Width = 5.33 * FactorEnd WithWith newPowerPoint.ActivePresentation.Slides(5).ShapesSet Shape3_5 = .AddShape(msoShapeRectangle, 12.24, 274.32, 691.2, 23.76)End WithWith Shape3_5.Fill.Solid.ForeColor.RGB = RGB(135, 137, 139)End WithShape3_5.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(5).ShapesSet Shape4_5 = .AddShape(msoShapeRectangle, 12.24, 274.32, 691.2, 113.76)End WithWith Shape4_5.Fill.Solid.ForeColor.RGB = RGB(255, 255, 255)End WithShape4_5.SelectWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Line.Weight = 1.5.Line.DashStyle = msoLineSolid.Line.Style = msoLineThickBetweenThin.Line.ForeColor.RGB = RGB(135, 137, 139)End WithShape4_5.SelectnewPowerPoint.ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBackSet activeSlide = NothingSet Shape1_5 = NothingSet Shape2_5 = NothingSet Shape3_5 = NothingSet Shape4_5 = Nothing'Add Slide 6Set 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).DeleteSet activeSlide = Nothing'Add Slide 7Set activeSlide = oPPTFile.Slides.Add(7, ppLayoutBlank)activeSlide.SelectactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 9.36, 18, 341.28, 33.84activeSlide.Shapes(1).TextFrame.TextRange.Text = "Quality dashboard - SEA"activeSlide.Shapes(1).SelectWith 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 WithactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 606.24, 2.16, 110.16, 14.4activeSlide.Shapes(2).TextFrame.TextRange.Text = "SERVICE QUALITY"activeSlide.Shapes(2).SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(7).ShapesSet Shape1_7 = .AddShape(msoShapeRectangle, 558, 54, 149.76, 18)End WithWith Shape1_7.Fill.Solid.ForeColor.RGB = RGB(135, 137, 139)End WithShape1_7.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(7).ShapesSet Shape2_7 = .AddShape(msoShapeRectangle, 558, 54, 149.76, 334.8)End WithWith Shape2_7.Fill.Solid.ForeColor.RGB = RGB(255, 255, 255)End WithShape2_7.SelectWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Line.Weight = 1.5.Line.DashStyle = msoLineSolid.Line.Style = msoLineThickBetweenThin.Line.ForeColor.RGB = RGB(135, 137, 139)End WithShape2_7.SelectnewPowerPoint.ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBackWith newPowerPoint.ActivePresentation.Slides(7).ShapesSet Shape3_7 = .AddShape(msoShapeRectangle, 9.36, 54, 266.4, 17.28)End WithWith Shape3_7.Fill.Solid.ForeColor.RGB = RGB(0, 150, 214)End WithShape3_7.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(7).ShapesSet Shape4_7 = .AddShape(msoShapeRectangle, 9.36, 54, 266.4, 165.6)End WithWith Shape4_7.Fill.Visible = msoFalseEnd WithShape4_7.SelectWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Line.Weight = 1.5.Line.DashStyle = msoLineSolid.Line.Style = msoLineThickBetweenThin.Line.ForeColor.RGB = RGB(0, 150, 214)End WithWith newPowerPoint.ActivePresentation.Slides(7).ShapesSet Shape5_7 = .AddShape(msoShapeRectangle, 285.12, 53.28, 266.4, 17.28)End WithWith Shape5_7.Fill.Solid.ForeColor.RGB = RGB(0, 150, 214)End WithShape5_7.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(7).ShapesSet Shape6_7 = .AddShape(msoShapeRectangle, 285.12, 53.28, 266.4, 165.6)End WithWith Shape6_7.Fill.Visible = msoFalseEnd WithShape6_7.SelectWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Line.Weight = 1.5.Line.DashStyle = msoLineSolid.Line.Style = msoLineThickBetweenThin.Line.ForeColor.RGB = RGB(0, 150, 214)End WithWith newPowerPoint.ActivePresentation.Slides(7).ShapesSet Shape7_7 = .AddShape(msoShapeRectangle, 9.36, 223.92, 266.4, 17.28)End WithWith Shape7_7.Fill.Solid.ForeColor.RGB = RGB(0, 150, 214)End WithShape7_7.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(7).ShapesSet Shape8_7 = .AddShape(msoShapeRectangle, 9.36, 223.92, 266.4, 147.6)End WithWith Shape8_7.Fill.Visible = msoFalseEnd WithShape8_7.SelectWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Line.Weight = 1.5.Line.DashStyle = msoLineSolid.Line.Style = msoLineThickBetweenThin.Line.ForeColor.RGB = RGB(0, 150, 214)End WithThisWorkbook.Sheets("5a.Quality dashboard1").Shapes("Chart 1").CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActiveWindow.View.PasteApplication.CutCopyMode = FalseactiveSlide.Shapes(11).SelectVisible = TrueWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 0.23 * Factor.Top = 1.2 * Factor.Height = 1.8 * Factor.Width = 3.2 * FactorEnd WithThisWorkbook.Sheets("5a.Quality dashboard1").Shapes("Object 1702").CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActiveWindow.View.PasteApplication.CutCopyMode = FalseactiveSlide.Shapes("Object 1702").SelectVisible = TrueWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 4.02 * Factor.Top = 1.09 * Factor.Height = 1.9 * Factor.Width = 3.23 * FactorEnd WithSet activeSlide = NothingSet Shape1_7 = NothingSet Shape2_7 = NothingSet Shape3_7 = NothingSet Shape4_7 = NothingSet Shape5_7 = NothingSet Shape6_7 = NothingSet Shape7_7 = NothingSet Shape8_7 = Nothing'Add Slide 8Set activeSlide = oPPTFile.Slides.Add(8, ppLayoutBlank)activeSlide.SelectactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 33.12, 18.72, 340.56, 33.84activeSlide.Shapes(1).TextFrame.TextRange.Text = "Quality dashboard - SEA"activeSlide.Shapes(1).SelectWith 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 WithactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 606.24, 2.16, 110.16, 14.4activeSlide.Shapes(2).TextFrame.TextRange.Text = "SERVICE QUALITY"activeSlide.Shapes(2).SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(8).ShapesSet Shape1_8 = .AddShape(msoShapeRectangle, 486, 52.56, 216, 18)End WithWith Shape1_8.Fill.Solid.ForeColor.RGB = RGB(135, 137, 139)End WithShape1_8.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(8).ShapesSet Shape2_8 = .AddShape(msoShapeRectangle, 486, 52.56, 216, 334.8)End WithWith Shape2_8.Fill.Solid.ForeColor.RGB = RGB(255, 255, 255)End WithShape2_8.SelectWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Line.Weight = 1.5.Line.DashStyle = msoLineSolid.Line.Style = msoLineThickBetweenThin.Line.ForeColor.RGB = RGB(135, 137, 139)End WithShape2_8.SelectnewPowerPoint.ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBackWith newPowerPoint.ActivePresentation.Slides(8).ShapesSet Shape3_8 = .AddShape(msoShapeRectangle, 33.84, 54, 425.52, 16.56)End WithWith Shape3_8.Fill.Solid.ForeColor.RGB = RGB(0, 150, 214)End WithShape3_8.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(8).ShapesSet Shape4_8 = .AddShape(msoShapeRectangle, 33.84, 53.28, 425.52, 161.28)End WithWith Shape4_8.Fill.Visible = msoFalseEnd WithShape4_8.SelectWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Line.Weight = 1.5.Line.DashStyle = msoLineSolid.Line.Style = msoLineThickBetweenThin.Line.ForeColor.RGB = RGB(0, 150, 214)End WithWith newPowerPoint.ActivePresentation.Slides(8).ShapesSet Shape5_8 = .AddShape(msoShapeRectangle, 35.28, 226.8, 425.52, 16.56)End WithWith Shape5_8.Fill.Solid.ForeColor.RGB = RGB(0, 150, 214)End WithShape5_8.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(8).ShapesSet Shape6_8 = .AddShape(msoShapeRectangle, 34.56, 226.8, 425.52, 161.28)End WithWith Shape6_8.Fill.Solid.ForeColor.RGB = RGB(255, 255, 255)End WithShape6_8.SelectWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Line.Weight = 1.5.Line.DashStyle = msoLineSolid.Line.Style = msoLineThickBetweenThin.Line.ForeColor.RGB = RGB(0, 150, 214)End WithThisWorkbook.Sheets("5b.Quality dashboard2").Shapes("Object 275").CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActiveWindow.View.PasteApplication.CutCopyMode = FalseactiveSlide.Shapes("Object 275").SelectVisible = TrueWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 0.58 * Factor.Top = 1.04 * Factor.Height = 1.84 * Factor.Width = 5.69 * FactorEnd WithThisWorkbook.Sheets("5b.Quality dashboard2").Shapes("Object 274").CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActiveWindow.View.PasteactiveSlide.Shapes("Object 274").SelectApplication.CutCopyMode = FalseVisible = TrueWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 0.57 * Factor.Top = 3.42 * Factor.Height = 1.93 * Factor.Width = 5.67 * FactorEnd WithSet activeSlide = NothingSet Shape1_8 = NothingSet Shape2_8 = NothingSet Shape3_8 = NothingSet Shape4_8 = NothingSet Shape5_8 = NothingSet Shape6_8 = Nothing'Add Slide 9Set activeSlide = oPPTFile.Slides.Add(9, ppLayoutBlank)activeSlide.SelectactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 25.92, 18.72, 396.72, 33.84activeSlide.Shapes(1).TextFrame.TextRange.Text = "Voice and Pulse of the Client"activeSlide.Shapes(1).SelectWith 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 WithactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 606.24, 2.16, 110.16, 14.4activeSlide.Shapes(2).TextFrame.TextRange.Text = "SERVICE QUALITY"activeSlide.Shapes(2).SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(9).ShapesSet Shape1_9 = .AddShape(msoShapeRectangle, 516.96, 65.52, 178.56, 16.56)End WithWith Shape1_9.Fill.Solid.ForeColor.RGB = RGB(135, 137, 139)End WithShape1_9.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(9).ShapesSet Shape2_9 = .AddShape(msoShapeRectangle, 516.52, 64.8, 178.56, 288)End WithWith Shape2_9.Fill.Solid.ForeColor.RGB = RGB(255, 255, 255)End WithShape2_9.SelectWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Line.Weight = 1.5.Line.DashStyle = msoLineSolid.Line.Style = msoLineThickBetweenThin.Line.ForeColor.RGB = RGB(135, 137, 139)End WithShape2_9.SelectnewPowerPoint.ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBackWith newPowerPoint.ActivePresentation.Slides(9).ShapesSet Shape3_9 = .AddShape(msoShapeRectangle, 30.24, 66.96, 396, 15.84)End WithWith Shape3_9.Fill.Solid.ForeColor.RGB = RGB(0, 150, 214)End WithShape3_9.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(9).ShapesSet Shape4_9 = .AddShape(msoShapeRectangle, 30.24, 270, 396, 15.84)End WithWith Shape4_9.Fill.Solid.ForeColor.RGB = RGB(0, 150, 214)End WithShape4_9.SelectWith 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 WithThisWorkbook.Sheets("6.Voice&Pulse").Range("B31:I35").CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActiveWindow.View.PasteApplication.CutCopyMode = FalseactiveSlide.Shapes(7).SelectVisible = TrueWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 0.42 * Factor.Top = 4.04 * Factor.Height = 1.19 * Factor.Width = 5.5 * FactorEnd WithThisWorkbook.Sheets("6.Voice&Pulse").Shapes("Object 249").CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActiveWindow.View.PasteApplication.CutCopyMode = FalseactiveSlide.Shapes("Object 249").SelectVisible = TrueWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 0.42 * Factor.Top = 1.15 * Factor.Height = 2.33 * Factor.Width = 5.5 * FactorEnd WithSet activeSlide = NothingSet Shape1_9 = NothingSet Shape2_9 = NothingSet Shape3_9 = NothingSet Shape4_9 = NothingApplication.ScreenUpdating = TrueMsgBox "Your PPT is Ready, SEA Review Tempate is ready for your review", vbInformationEnd WithEnd 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 usingDim newPowerPoint As PowerPoint.ApplicationDim activeSlide As PowerPoint.SlideDim cht As Excel.ChartObjectDim oPPTFile As PowerPoint.PresentationDim wb As WorkbookDim Shape1 As ObjectDim Shape2 As ObjectDim Shape3 As ObjectDim Shape1_4 As ObjectDim Shape2_4 As ObjectDim Shape1_5 As ObjectDim Shape2_5 As ObjectDim Shape3_5 As ObjectDim Shape4_5 As ObjectDim Shape1_7 As ObjectDim Shape2_7 As ObjectDim Shape3_7 As ObjectDim Shape4_7 As ObjectDim Shape5_7 As ObjectDim Shape6_7 As ObjectDim Shape7_7 As ObjectDim Shape8_7 As ObjectDim Shape1_8 As ObjectDim Shape2_8 As ObjectDim Shape3_8 As ObjectDim Shape4_8 As ObjectDim Shape5_8 As ObjectDim Shape6_8 As ObjectDim Shape1_9 As ObjectDim Shape2_9 As ObjectDim Shape3_9 As ObjectDim Shape4_9 As ObjectDim c As RangeDim lngRow As LongDim lngCol As LongDim objTable As TableDim strTemplate As StringDim x As LongConst Factor As Integer = 72Set wb = ThisWorkbook'Look for existing instanceOn Error Resume NextSet newPowerPoint = GetObject(, "PowerPoint.Application")On Error GoTo 0strTemplate = 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 PowerPointIf newPowerPoint Is Nothing ThenSet newPowerPoint = New PowerPoint.ApplicationEnd If'Show the PowerPointnewPowerPoint.Visible = TruenewPowerPoint.Presentations.Open strTemplate, untitled:=msoTrueFor x = newPowerPoint.ActivePresentation.Slides.Count To 1 Step -1newPowerPoint.ActivePresentation.Slides(x).DeleteNext x'Apply Powerpoint LayoutFilename = 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.ActivePresentationoPPTFile.SaveAs Filename'Add the title slideSet activeSlide = oPPTFile.Slides.Add(1, ppLayoutCustom)activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 10, 20, 300, 5activeSlide.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 = newTextSet activeSlide = Nothing'Add Slide 2Set activeSlide = oPPTFile.Slides.Add(2, ppLayoutBlank)ThisWorkbook.Sheets("Slide1").Shapes("Picture 5").CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActivePresentation.Slides(2).Shapes.Paste.SelectVisible = TrueApplication.CutCopyMode = FalseWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Height = 0.5 * Factor.Width = 0.5 * Factor.Left = 0.16 * Factor.Top = 0.28 * FactorEnd WithactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 59.76, 13.68, 372.96, 36.72activeSlide.Shapes(2).TextFrame.TextRange.Text = "Enterprise Services Scorecard "activeSlide.Shapes(2).SelectWith 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 WithactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 414.72, 16.56, 36.72, 32.4activeSlide.Shapes(3).TextFrame.TextRange.Text = "½"activeSlide.Shapes(3).SelectWith 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 WithactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 430.56, 16.56, 64.08, 36.72activeSlide.Shapes(4).TextFrame.TextRange.Text = "SEA"activeSlide.Shapes(4).SelectWith 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 WithactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 59.76, 38.8, 97.92, 36.72activeSlide.Shapes(5).TextFrame.TextRange.Text = InputBox("Please enter the month in the following format (August)")activeSlide.Shapes(5).SelectWith 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 WithactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 571.68, 0, 148.32, 21.6activeSlide.Shapes(6).TextFrame.TextRange.Text = "EXECUTIVE SUMMARY"activeSlide.Shapes(6).SelectWith 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 WithThisWorkbook.Sheets("Slide1").Range("U10:V13").CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActiveWindow.View.PasteApplication.CutCopyMode = FalseactiveSlide.Shapes(7).SelectVisible = TrueWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 7.13 * Factor.Top = 0.27 * Factor.Height = 0.74 * Factor.Width = 2.8 * FactorEnd WithWith newPowerPoint.ActivePresentation.Slides(2).ShapesSet Shape1 = .AddShape(msoShapeRectangle, 576.72, 80.64, 129.6, 17.28)End WithWith Shape1.Fill.Solid.ForeColor.RGB = RGB(135, 137, 139)End WithShape1.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(2).ShapesSet Shape2 = .AddShape(msoShapeRectangle, 576.72, 81.36, 129.6, 313.92)End WithWith Shape2.Fill.Visible = msoFalseEnd WithShape2.SelectWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Line.Weight = 1.5.Line.DashStyle = msoLineSolid.Line.Style = msoLineThickBetweenThin.Line.ForeColor.RGB = RGB(135, 137, 139)End WithWith newPowerPoint.ActivePresentation.Slides(2).ShapesSet Shape3 = .AddShape(msoShapeRectangle, 40.32, 347.04, 663.84, 51.12)End WithWith Shape3.Fill.Solid.ForeColor.RGB = RGB(255, 255, 255)End WithShape3.SelectnewPowerPoint.ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBackThisWorkbook.Sheets("Slide1").Range("B8:R28").CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActiveWindow.View.PasteactiveSlide.Shapes(11).SelectApplication.CutCopyMode = FalseVisible = TrueSet objTable = newPowerPoint.ActiveWindow.Selection.ShapeRange.TableFor lngRow = 1 To objTable.Rows.CountFor lngCol = 1 To objTable.Columns.CountIf objTable.Rows(lngRow).Cells(lngCol).Selected ThenWith objTable.Rows(lngRow).Cells(lngCol).Shape.TextFrame.TextRange.Font.Size = 7End WithEnd IfNextNextWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 0.16 * Factor.Top = 1.12 * Factor.Height = 3.7 * Factor.Width = 7.78 * FactorEnd WithSet activeSlide = NothingSet Shape1 = NothingSet Shape2 = NothingSet Shape3 = Nothing'Add Slide 3Set 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 4Set activeSlide = oPPTFile.Slides.Add(4, ppLayoutBlank)activeSlide.SelectactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 12.24, 18.72, 364.32, 33.84activeSlide.Shapes(1).TextFrame.TextRange.Text = "Overall sales performance"activeSlide.Shapes(1).SelectWith 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 WithactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 661.68, 2.16, 44.64, 14.4activeSlide.Shapes(2).TextFrame.TextRange.Text = "SALES"activeSlide.Shapes(2).SelectWith 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 WithThisWorkbook.Sheets("Slide2").Range("X21:X24").CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActiveWindow.View.PasteApplication.CutCopyMode = FalseactiveSlide.Shapes(3).SelectVisible = TrueWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 8.67 * Factor.Top = 0.23 * Factor.Height = 0.72 * Factor.Width = 1.28 * FactorEnd WithWith newPowerPoint.ActivePresentation.Slides(4).ShapesSet Shape1_4 = .AddShape(msoShapeRectangle, 591.12, 73.44, 108.72, 17.28)End WithWith Shape1_4.Fill.Solid.ForeColor.RGB = RGB(135, 137, 139)End WithShape1_4.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(4).ShapesSet Shape2_4 = .AddShape(msoShapeRectangle, 591.12, 73.44, 108.72, 283.68)End WithWith Shape2_4.Fill.Visible = msoFalseEnd WithShape2_4.SelectWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Line.Weight = 1.5.Line.DashStyle = msoLineSolid.Line.Style = msoLineThickBetweenThin.Line.ForeColor.RGB = RGB(135, 137, 139)End WithThisWorkbook.Sheets("Slide2").Range("B8:R20").CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActiveWindow.View.PasteApplication.CutCopyMode = FalseactiveSlide.Shapes(6).SelectVisible = TrueSet objTable = newPowerPoint.ActiveWindow.Selection.ShapeRange.TableFor lngRow = 1 To objTable.Rows.CountFor lngCol = 1 To objTable.Columns.CountIf objTable.Rows(lngRow).Cells(lngCol).Selected ThenWith objTable.Rows(lngRow).Cells(lngCol).Shape.TextFrame.TextRange.Font.Name = "HP Simplified".Size = 10End WithEnd IfNextNextWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 0.17 * Factor.Top = 1.01 * Factor.Height = 3.92 * Factor.Width = 7.95 * FactorEnd WithSet activeSlide = NothingSet Shape1_4 = NothingSet Shape2_4 = Nothing'Add Slide 5Set activeSlide = oPPTFile.Slides.Add(5, ppLayoutBlank)activeSlide.SelectactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 16.56, 15.12, 496.08, 33.84activeSlide.Shapes(1).TextFrame.TextRange.Text = "Win rate trends and top deals/losses"activeSlide.Shapes(1).SelectWith 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 WithactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 661.68, 2.16, 44.64, 14.4activeSlide.Shapes(2).TextFrame.TextRange.Text = "SALES"activeSlide.Shapes(2).SelectWith 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 WithThisWorkbook.Sheets("3.Win rate trends").Shapes("Group 1").CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActiveWindow.View.PasteApplication.CutCopyMode = FalseactiveSlide.Shapes(3).SelectVisible = TrueWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 0.2 * Factor.Top = 0.73 * Factor.Height = 2.84 * Factor.Width = 4.09 * FactorEnd WithWith newPowerPoint.ActivePresentation.Slides(5).ShapesSet Shape1_5 = .AddShape(msoShapeRectangle, 316.08, 54, 389.52, 14.4)End WithWith Shape1_5.Fill.Solid.ForeColor.RGB = RGB(0, 150, 214)End WithShape1_5.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(5).ShapesSet Shape2_5 = .AddShape(msoShapeRectangle, 316.08, 53.28, 389.52, 204.48)End WithWith Shape2_5.Fill.Visible = msoFalseEnd WithShape2_5.SelectWith 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").ActivateThisWorkbook.Sheets("3.Win rate trends").Range("J5:O16").CopyActiveSheet.Range("J22").SelectActiveSheet.PasteActiveSheet.Range("P23:P33").SelectFor Each c In Range("P23:P33")If c.Value = 0 Thenc.EntireRow.Hidden = TrueElsec.EntireRow.Hidden = FalseEnd IfNext cActiveSheet.Range("J22:O33").Cells.SpecialCells(xlCellTypeVisible).SelectSelection.CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActiveWindow.View.PasteApplication.CutCopyMode = FalseThisWorkbook.Sheets("3.Win rate trends").Range("J22:O33").EntireRow.Hidden = FalseThisWorkbook.Sheets("3.Win rate trends").Range("J22:O33").ClearContentsactiveSlide.Shapes(6).SelectWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 4.42 * Factor.Top = 0.99 * Factor.Height = 2.5 * Factor.Width = 5.33 * FactorEnd WithWith newPowerPoint.ActivePresentation.Slides(5).ShapesSet Shape3_5 = .AddShape(msoShapeRectangle, 12.24, 274.32, 691.2, 23.76)End WithWith Shape3_5.Fill.Solid.ForeColor.RGB = RGB(135, 137, 139)End WithShape3_5.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(5).ShapesSet Shape4_5 = .AddShape(msoShapeRectangle, 12.24, 274.32, 691.2, 113.76)End WithWith Shape4_5.Fill.Solid.ForeColor.RGB = RGB(255, 255, 255)End WithShape4_5.SelectWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Line.Weight = 1.5.Line.DashStyle = msoLineSolid.Line.Style = msoLineThickBetweenThin.Line.ForeColor.RGB = RGB(135, 137, 139)End WithShape4_5.SelectnewPowerPoint.ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBackSet activeSlide = NothingSet Shape1_5 = NothingSet Shape2_5 = NothingSet Shape3_5 = NothingSet Shape4_5 = Nothing'Add Slide 6Set 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).DeleteSet activeSlide = Nothing'Add Slide 7Set activeSlide = oPPTFile.Slides.Add(7, ppLayoutBlank)activeSlide.SelectactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 9.36, 18, 341.28, 33.84activeSlide.Shapes(1).TextFrame.TextRange.Text = "Quality dashboard - SEA"activeSlide.Shapes(1).SelectWith 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 WithactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 606.24, 2.16, 110.16, 14.4activeSlide.Shapes(2).TextFrame.TextRange.Text = "SERVICE QUALITY"activeSlide.Shapes(2).SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(7).ShapesSet Shape1_7 = .AddShape(msoShapeRectangle, 558, 54, 149.76, 18)End WithWith Shape1_7.Fill.Solid.ForeColor.RGB = RGB(135, 137, 139)End WithShape1_7.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(7).ShapesSet Shape2_7 = .AddShape(msoShapeRectangle, 558, 54, 149.76, 334.8)End WithWith Shape2_7.Fill.Solid.ForeColor.RGB = RGB(255, 255, 255)End WithShape2_7.SelectWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Line.Weight = 1.5.Line.DashStyle = msoLineSolid.Line.Style = msoLineThickBetweenThin.Line.ForeColor.RGB = RGB(135, 137, 139)End WithShape2_7.SelectnewPowerPoint.ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBackWith newPowerPoint.ActivePresentation.Slides(7).ShapesSet Shape3_7 = .AddShape(msoShapeRectangle, 9.36, 54, 266.4, 17.28)End WithWith Shape3_7.Fill.Solid.ForeColor.RGB = RGB(0, 150, 214)End WithShape3_7.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(7).ShapesSet Shape4_7 = .AddShape(msoShapeRectangle, 9.36, 54, 266.4, 165.6)End WithWith Shape4_7.Fill.Visible = msoFalseEnd WithShape4_7.SelectWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Line.Weight = 1.5.Line.DashStyle = msoLineSolid.Line.Style = msoLineThickBetweenThin.Line.ForeColor.RGB = RGB(0, 150, 214)End WithWith newPowerPoint.ActivePresentation.Slides(7).ShapesSet Shape5_7 = .AddShape(msoShapeRectangle, 285.12, 53.28, 266.4, 17.28)End WithWith Shape5_7.Fill.Solid.ForeColor.RGB = RGB(0, 150, 214)End WithShape5_7.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(7).ShapesSet Shape6_7 = .AddShape(msoShapeRectangle, 285.12, 53.28, 266.4, 165.6)End WithWith Shape6_7.Fill.Visible = msoFalseEnd WithShape6_7.SelectWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Line.Weight = 1.5.Line.DashStyle = msoLineSolid.Line.Style = msoLineThickBetweenThin.Line.ForeColor.RGB = RGB(0, 150, 214)End WithWith newPowerPoint.ActivePresentation.Slides(7).ShapesSet Shape7_7 = .AddShape(msoShapeRectangle, 9.36, 223.92, 266.4, 17.28)End WithWith Shape7_7.Fill.Solid.ForeColor.RGB = RGB(0, 150, 214)End WithShape7_7.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(7).ShapesSet Shape8_7 = .AddShape(msoShapeRectangle, 9.36, 223.92, 266.4, 147.6)End WithWith Shape8_7.Fill.Visible = msoFalseEnd WithShape8_7.SelectWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Line.Weight = 1.5.Line.DashStyle = msoLineSolid.Line.Style = msoLineThickBetweenThin.Line.ForeColor.RGB = RGB(0, 150, 214)End WithThisWorkbook.Sheets("5a.Quality dashboard1").Shapes("Chart 1").CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActiveWindow.View.PasteApplication.CutCopyMode = FalseactiveSlide.Shapes(11).SelectVisible = TrueWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 0.23 * Factor.Top = 1.2 * Factor.Height = 1.8 * Factor.Width = 3.2 * FactorEnd WithThisWorkbook.Sheets("5a.Quality dashboard1").Shapes("Object 1702").CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActiveWindow.View.PasteApplication.CutCopyMode = FalseactiveSlide.Shapes("Object 1702").SelectVisible = TrueWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 4.02 * Factor.Top = 1.09 * Factor.Height = 1.9 * Factor.Width = 3.23 * FactorEnd WithSet activeSlide = NothingSet Shape1_7 = NothingSet Shape2_7 = NothingSet Shape3_7 = NothingSet Shape4_7 = NothingSet Shape5_7 = NothingSet Shape6_7 = NothingSet Shape7_7 = NothingSet Shape8_7 = Nothing'Add Slide 8Set activeSlide = oPPTFile.Slides.Add(8, ppLayoutBlank)activeSlide.SelectactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 33.12, 18.72, 340.56, 33.84activeSlide.Shapes(1).TextFrame.TextRange.Text = "Quality dashboard - SEA"activeSlide.Shapes(1).SelectWith 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 WithactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 606.24, 2.16, 110.16, 14.4activeSlide.Shapes(2).TextFrame.TextRange.Text = "SERVICE QUALITY"activeSlide.Shapes(2).SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(8).ShapesSet Shape1_8 = .AddShape(msoShapeRectangle, 486, 52.56, 216, 18)End WithWith Shape1_8.Fill.Solid.ForeColor.RGB = RGB(135, 137, 139)End WithShape1_8.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(8).ShapesSet Shape2_8 = .AddShape(msoShapeRectangle, 486, 52.56, 216, 334.8)End WithWith Shape2_8.Fill.Solid.ForeColor.RGB = RGB(255, 255, 255)End WithShape2_8.SelectWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Line.Weight = 1.5.Line.DashStyle = msoLineSolid.Line.Style = msoLineThickBetweenThin.Line.ForeColor.RGB = RGB(135, 137, 139)End WithShape2_8.SelectnewPowerPoint.ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBackWith newPowerPoint.ActivePresentation.Slides(8).ShapesSet Shape3_8 = .AddShape(msoShapeRectangle, 33.84, 54, 425.52, 16.56)End WithWith Shape3_8.Fill.Solid.ForeColor.RGB = RGB(0, 150, 214)End WithShape3_8.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(8).ShapesSet Shape4_8 = .AddShape(msoShapeRectangle, 33.84, 53.28, 425.52, 161.28)End WithWith Shape4_8.Fill.Visible = msoFalseEnd WithShape4_8.SelectWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Line.Weight = 1.5.Line.DashStyle = msoLineSolid.Line.Style = msoLineThickBetweenThin.Line.ForeColor.RGB = RGB(0, 150, 214)End WithWith newPowerPoint.ActivePresentation.Slides(8).ShapesSet Shape5_8 = .AddShape(msoShapeRectangle, 35.28, 226.8, 425.52, 16.56)End WithWith Shape5_8.Fill.Solid.ForeColor.RGB = RGB(0, 150, 214)End WithShape5_8.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(8).ShapesSet Shape6_8 = .AddShape(msoShapeRectangle, 34.56, 226.8, 425.52, 161.28)End WithWith Shape6_8.Fill.Solid.ForeColor.RGB = RGB(255, 255, 255)End WithShape6_8.SelectWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Line.Weight = 1.5.Line.DashStyle = msoLineSolid.Line.Style = msoLineThickBetweenThin.Line.ForeColor.RGB = RGB(0, 150, 214)End WithThisWorkbook.Sheets("5b.Quality dashboard2").Shapes("Object 275").CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActiveWindow.View.PasteApplication.CutCopyMode = FalseactiveSlide.Shapes("Object 275").SelectVisible = TrueWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 0.58 * Factor.Top = 1.04 * Factor.Height = 1.84 * Factor.Width = 5.69 * FactorEnd WithThisWorkbook.Sheets("5b.Quality dashboard2").Shapes("Object 274").CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActiveWindow.View.PasteactiveSlide.Shapes("Object 274").SelectApplication.CutCopyMode = FalseVisible = TrueWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 0.57 * Factor.Top = 3.42 * Factor.Height = 1.93 * Factor.Width = 5.67 * FactorEnd WithSet activeSlide = NothingSet Shape1_8 = NothingSet Shape2_8 = NothingSet Shape3_8 = NothingSet Shape4_8 = NothingSet Shape5_8 = NothingSet Shape6_8 = Nothing'Add Slide 9Set activeSlide = oPPTFile.Slides.Add(9, ppLayoutBlank)activeSlide.SelectactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 25.92, 18.72, 396.72, 33.84activeSlide.Shapes(1).TextFrame.TextRange.Text = "Voice and Pulse of the Client"activeSlide.Shapes(1).SelectWith 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 WithactiveSlide.Shapes.AddTextbox msoTextOrientationHorizontal, 606.24, 2.16, 110.16, 14.4activeSlide.Shapes(2).TextFrame.TextRange.Text = "SERVICE QUALITY"activeSlide.Shapes(2).SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(9).ShapesSet Shape1_9 = .AddShape(msoShapeRectangle, 516.96, 65.52, 178.56, 16.56)End WithWith Shape1_9.Fill.Solid.ForeColor.RGB = RGB(135, 137, 139)End WithShape1_9.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(9).ShapesSet Shape2_9 = .AddShape(msoShapeRectangle, 516.52, 64.8, 178.56, 288)End WithWith Shape2_9.Fill.Solid.ForeColor.RGB = RGB(255, 255, 255)End WithShape2_9.SelectWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Line.Weight = 1.5.Line.DashStyle = msoLineSolid.Line.Style = msoLineThickBetweenThin.Line.ForeColor.RGB = RGB(135, 137, 139)End WithShape2_9.SelectnewPowerPoint.ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBackWith newPowerPoint.ActivePresentation.Slides(9).ShapesSet Shape3_9 = .AddShape(msoShapeRectangle, 30.24, 66.96, 396, 15.84)End WithWith Shape3_9.Fill.Solid.ForeColor.RGB = RGB(0, 150, 214)End WithShape3_9.SelectWith 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 WithWith newPowerPoint.ActivePresentation.Slides(9).ShapesSet Shape4_9 = .AddShape(msoShapeRectangle, 30.24, 270, 396, 15.84)End WithWith Shape4_9.Fill.Solid.ForeColor.RGB = RGB(0, 150, 214)End WithShape4_9.SelectWith 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 WithThisWorkbook.Sheets("6.Voice&Pulse").Range("B31:I35").CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActiveWindow.View.PasteApplication.CutCopyMode = FalseactiveSlide.Shapes(7).SelectVisible = TrueWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 0.42 * Factor.Top = 4.04 * Factor.Height = 1.19 * Factor.Width = 5.5 * FactorEnd WithThisWorkbook.Sheets("6.Voice&Pulse").Shapes("Object 249").CopynewPowerPoint.ActiveWindow.View.GotoSlide activeSlide.SlideIndexnewPowerPoint.ActiveWindow.View.PasteApplication.CutCopyMode = FalseactiveSlide.Shapes("Object 249").SelectVisible = TrueWith newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 0.42 * Factor.Top = 1.15 * Factor.Height = 2.33 * Factor.Width = 5.5 * FactorEnd WithSet activeSlide = NothingSet Shape1_9 = NothingSet Shape2_9 = NothingSet Shape3_9 = NothingSet Shape4_9 = NothingApplication.ScreenUpdating = TrueMsgBox "Your PPT is Ready, SEA Review Tempate is ready for your review", vbInformationEnd WithEnd Sub
thanksPallavi
 
Upvote 0

Forum statistics

Threads
1,215,506
Messages
6,125,197
Members
449,214
Latest member
mr_ordinaryboy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top