[FONT="]Hello hope everyone is well! I am trying to create a macro code to save a powerpoint that I have active and opened I have tried several methos but each one I get different error. So far this is the code that I have as well as the defined parameters. Please let me know if you have any feed back thank you!!![/FONT]
Sub PowerpointRO()
'
' PowerpointUpdate Macro
'
[FONT="]Const nPos As Integer = 13 ' #slide
Dim rng As Range
Set rng = Sheets("Risk & Opp").Range("A1:K10")
Dim obj As Powerpoint.Application
Set obj = CreateObject("Powerpoint.Application")
Dim pre As Presentation
Dim sld As Slide
Dim sH
Dim sW
Set obj = CreateObject("Powerpoint.Application")
Application.ScreenUpdating = False
Dim sFile
sFile = "S:\Projects\2.2 Work products\2.2.2 Systems Engineering\2.2.2.9 Dashboard\Dashboard\Project Report.pptx"
Set pre = obj.Presentations.Open(sFile)
obj.ActiveWindow.View.GotoSlide nPos
Set sld = pre.Slides(nPos)
rng.Copy
sld.Shapes.PasteSpecial DataType:=2
Application.CutCopyMode = False
With pre.PageSetup
sH = .SlideHeight
sW = .SlideWidth
End With
With obj.ActiveWindow.Selection.ShapeRange
.Width = 400
.Align msoAlignCenters, True
.Align msoAlignMiddles, True
End With
Application.ScreenUpdating = True
'obj.Quit
End Sub
[/FONT]
Sub PowerpointAL()
'
' PowerpointUpdate Macro
'
Sub SavePPT()
Windows("Project Reporet Dasboard").Activate
ActiveWorkbook.SaveAs fileName:= _
("S:\Projects\2.2 Work products\2.2.2 Systems Engineering\2.2.2.9 Dashboard\Dashboard\Project Report Dashboard" & Format(Now(), YYYY.MM.DD) & ".xlsm")
ActiveWorkbook.SaveAs fileName:= _
("S:\Projects\2.2 Work products\2.2.2 Systems Engineering\2.2.2.9 Dashboard\Dashboard\Archive\Project Report Dashboard" & Format(Now(), YYYY.MM.DD) & ".xlsm")
End Sub
[FONT="]I am hoping to save the power point in two different folders. Let me know if I can help in anyway![/FONT]
Sub PowerpointRO()
'
' PowerpointUpdate Macro
'
[FONT="]Const nPos As Integer = 13 ' #slide
Dim rng As Range
Set rng = Sheets("Risk & Opp").Range("A1:K10")
Dim obj As Powerpoint.Application
Set obj = CreateObject("Powerpoint.Application")
Dim pre As Presentation
Dim sld As Slide
Dim sH
Dim sW
Set obj = CreateObject("Powerpoint.Application")
Application.ScreenUpdating = False
Dim sFile
sFile = "S:\Projects\2.2 Work products\2.2.2 Systems Engineering\2.2.2.9 Dashboard\Dashboard\Project Report.pptx"
Set pre = obj.Presentations.Open(sFile)
obj.ActiveWindow.View.GotoSlide nPos
Set sld = pre.Slides(nPos)
rng.Copy
sld.Shapes.PasteSpecial DataType:=2
Application.CutCopyMode = False
With pre.PageSetup
sH = .SlideHeight
sW = .SlideWidth
End With
With obj.ActiveWindow.Selection.ShapeRange
.Width = 400
.Align msoAlignCenters, True
.Align msoAlignMiddles, True
End With
Application.ScreenUpdating = True
'obj.Quit
End Sub
[/FONT]
Sub PowerpointAL()
'
' PowerpointUpdate Macro
'
Sub SavePPT()
Windows("Project Reporet Dasboard").Activate
ActiveWorkbook.SaveAs fileName:= _
("S:\Projects\2.2 Work products\2.2.2 Systems Engineering\2.2.2.9 Dashboard\Dashboard\Project Report Dashboard" & Format(Now(), YYYY.MM.DD) & ".xlsm")
ActiveWorkbook.SaveAs fileName:= _
("S:\Projects\2.2 Work products\2.2.2 Systems Engineering\2.2.2.9 Dashboard\Dashboard\Archive\Project Report Dashboard" & Format(Now(), YYYY.MM.DD) & ".xlsm")
End Sub
[FONT="]I am hoping to save the power point in two different folders. Let me know if I can help in anyway![/FONT]