Hi Everyone,

I have been working on this macro for a few days and am stuck. This is what I am trying to accomplish.

1. I need a specific PowerPoint presentation to open when I run a macro in excel
2. Update all of the links within the PowerPoint
3. Save the PowerPoint as another name.
4. Close the PowerPoint.

My end goal is to set up a loop to go through and update the powerpoint based on 15 different Business Units and save it as a different name each time the Power is updated.

I have accomplished steps 1 and 2. I cannot figure out steps 3 and 4, how to save and close the powerpoint. Any help will be appreciated.

Here is the code I am currently using. The last 2 lines of code are what is failing. I have also tried ActivePresentation to save and close and that is not working either...

All help is appreciated.

Dim pApp As Object
Dim pPreso As Object
Dim pSlide As Object
Dim sPreso As String

sPreso = "S:\MasterPowerPointv2.pptx"

On Error Resume Next
Set pApp = GetObject(, "PowerPoint.Application")

If Err.Number <> 0 Then
Set pApp = CreateObject("PowerPoint.Application")
pApp.Visible = True
End If

On Error Resume Next
Set pPreso = pApp.Presentations(sPreso)

If Err.Number <> 0 Then
Set pPreso = pApp.Presentations.Open(Filename:=sPreso)
End If
On Error GoTo 0
pPreso.UpdateLinks

On Error GoTo 0
pPreso.activepresentation.SaveAs "C:\test.pptx"
pPreso.Quit