Save As PowerPoint File from Excel VBA

davidb88

Board Regular
Joined
Sep 23, 2013
Messages
76
Hi -

I have a macro that opens a powerpoint presentation and updates linked graphs. I was able to figure out how to get the VBA to save and close the presentation, but because this is a weekly report, I was hoping to be able to save a new copy under a different name. I've tried a number of different solutions but to no avail. I continue to get an error message "SaveAs: PowerPoint encountered an error when attempting to save." This is my code I tried. Any suggestions? Thanks!

Code:
sFile = "Operations Weekly Deck - " & Date
sFilePath = "S:\\Reporting\US\Weekly Reporting Decks\Operations Weekly Deck\" & sFile & ".pptx"
pPreso.SaveAs sFilePath
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Forum statistics

Threads
1,215,461
Messages
6,124,952
Members
449,198
Latest member
MhammadishaqKhan

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