Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

excel vba powerpoint

Forum home » Delegate support and help forum » Microsoft VBA Training and help » Excel VBA - Powerpoint SaveAs

Excel VBA - Powerpoint SaveAs

ResolvedVersion 2007

Tereesa has attended:
Excel Advanced course
Excel VBA Intro Intermediate course

Excel VBA - Powerpoint SaveAs

Hi,

I have created (mostly sourced on internet) an Excel VBA code that will open a new powerpoint slide, then copy-paste selected objects from Excel to the slide, my problem now is how to save it?
I need it to pick up the file name as well as the location of where to save (as it is not always the same) from a excel cell. Is this possible?
I am struggling to find a solution online.
Thanks!

RE: Excel VBA - Powerpoint SaveAs

Hi Tereesa, thanks for your query. The answer depends on how you are manipulating the Powerpoint object. Ideally you should have created an instance of Powerpoint in an object variable and be manipulating Powerpoint's objects and methods using the variable. When you do that it should be something along the lines of "appPowerpoint.presentation.saveas" and then the filename as one of the arguments.

The filename can then simply be collected from the cell in Excel, dropped into a variable and passed as an argument to the SaveAs method above. It sounds fiddly but is actually very simple.

Hope this helps,

Anthony

Tue 10 Apr 2012: Automatically marked as resolved.

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

VBA tip:

Suspend DisplayAlerts in VBA

To stop Excel asking you things like "Do you want to delete this file...", use the following line of code at the beginning of the relevant VBA procedure:

Application.DisplayAlerts = False

At the end of the procedure make sure you use the following code to reactivate Display Alerts:

Application.DisplayAlerts = True

View all VBA hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.19 secs.