Software Solutions Online

VBA and VB.Net Tutorials, Education and Programming Services

Copy slides from one presentation to another (vba for powerpoint).

In this article I will explain how you can copy slides from one PowerPoint presentation to another using VBA.

Before Running the Code

Preserve Formatting When Copying Slides

Slides to be copied

Asides from copying the slide the code above copies the design. If you wanted to do this manually you would copy the slidemaster over to the new presentation. You can’t copy the slidemaster using VBA but instead you can set the design property of the slides.

Download Sample Files.

3 thoughts on “Copy Slides From One Presentation to Another (VBA for PowerPoint)”

Leave a reply cancel reply.

Your email address will not be published. Required fields are marked *

How to use VBA in PowerPoint: A beginner’s guide

  • Written by: Jamie Garroch
  • Categories: PowerPoint productivity , Presentation technology
  • Comments: 45

powerpoint vba copy slide to new presentation

Here at BrightCarbon we’re always looking for new ways to improve our own PowerPoint productivity and then share that knowledge with the presentation community (that includes you, by the way!). One of the ways we do this is by using VBA code to automate and extend the functionality of PowerPoint. We publish  free PowerPoint VBA code snippets here in our blog for you to use and also offer a PowerPoint automation service . This article explains how to grab the code from our articles and use it in your PowerPoint project, so that you can take your productivity to the next level!

What is VBA?

Visual Basic for Applications (VBA) is a programming environment for Microsoft Office applications. It’s included with your installation of Office by default  ( unless your system administrator has deactivated it ) . PowerPoint VBA provides you with a way to do one of two things   using macros and add-ins:  

  • A utomate  PowerPo int:   If you ever find yourself repeating the same task over and over again, VBA could be your new best friend.  Let’s say you have 100 slides and you need to unhide all hidden objects  across all those slides . That could take you  many  eye-straining minutes, but with a PowerPoint VBA it takes around a  second.
  • E xtend  PowerPoint :   Sometimes PowerPoint doesn’t have the feature you need  to complete your task . As an example, if you end up deleting default layouts from a template, there’s no  easy  way in PowerPoint to get them back. This article includes PowerPoint VBA code to do just that!

How to open the VBE (Visual Basic Editor)

Getting to meet your VBA friend is very simple. With PowerPoint open and at least one presentation file open, press  Alt+F11 * on your keyboard. This will open the VBE (Visual Basic Editor):  

PowerPoint VBE No Modules

*If for some reason Alt+F11 isn’t mapped on your keyboard you can right click anywhere on the ribbon, select  Customize the Ribbon…  and in the window that appears, tick the  Developer Tab  check box over on the right hand side before clicking  OK  to close the window. Now you can click the  Visual Basic  button within this tab:  

PowerPoint Developer Tab Visual Basic

Adding PowerPoint VBA code  

To add some VBA code, you need a container to put it in so go ahead and click  Insert  from the menu and then select  Module :  

PowerPoint VBE Insert Module

You now have a module ready to paste the VBA code into  from one of our blog articles :  

PowerPoint VBE Module Inserted

Copy the VBA code from  the required blog article  by double-clicking on it and then paste it into the  Module1  window above.  Here’s a very simple example of some code  to display a message dialogue :

You should now see something like this:  

PowerPoint VBA

Because this code is just a single  Sub  procedure called  HelloWorld , it’s referred to as a macro.  

Running  the PowerPoint VBA macro  

Now you have the macro in your presentation you can use  Alt+Tab  to return to the more familiar PowerPoint window. From here, the macro can be run by pressing  Alt+F8  on your keyboard  (or b y  clicking the  Macros  button in the Developer tab)  which opens a window containing a list of available macros:  

PowerPoint VBA

Security Soup

The first time you add VBA code to a file, Microsoft assumes that it is safe because you added it. As soon as you save, close and reopen the file, Microsoft doesn’t know that it’s your code so it will disable it by default. You can tell the Office app to allow your code to run either by signing it with a digital certificate (beyond the scope of this article) or by lowering the security setting for the app. You can do this in PowerPoint by clicking File / Options / Trust Center / Trust Center Settings / Macro Settings and selecting this option shown below:

VBA Macro Settings

Saving your file  

powerpoint vba copy slide to new presentation

Once you ’ve added  VBA code  to  your presentation, PowerPoint will  ask you to save it as a  pptm  file  (the ‘m’ stands for macro)  instead of the more  familiar  pptx  format .  You can go ahead and do this to  either  keep a n archive  copy of your  code-enabled  project  or   to  create your personal macro library.  

If you want to distribute your  presentation,   it’s advisable to   save  it  using the familiar pptx format so that  your  recipients don’t see lots of verbose  security  messages  when opening  pptm  files!  

Y ou can  make  your file saveable as a standard presentation again  by  right – click ing  on  each   code module in the  project explorer pane , clicking  Remove   ModuleX …   and either click  Yes   (if you want to keep a backup of the modules independently of your presentation)  or  No   when  asked if you want to save the module before removing it :  

powerpoint vba copy slide to new presentation

Now your presentation doesn’t include any code and you can save it as a pptx file.  

So, there you have it.  You now know how to open the VBE, insert a PowerPoint VBA code module, paste code into it, run the macro and save the file in either pptm  or pptx formats. All you need is a cool macro to make your daily life even easier. Keep checking in with our blog for more useful macros – like this one on restoring default slide master layouts!

Got something extra you’d like PowerPoint to do?

Check out our PowerPoint automation service which provides you with a custom solution to your specific needs.

powerpoint vba copy slide to new presentation

Jamie Garroch

Principal technical consultant, related articles, how to consistently brand graphs and charts across microsoft office.

  • PowerPoint design / PowerPoint productivity
  • Comments: 1

How do you make sure that your graphs and charts have consistent branding across Excel, PowerPoint and Word? Learn how to create and use custom templates that support your brand identity across Microsoft Office.

powerpoint vba copy slide to new presentation

Changes to VBA Macro Security in Microsoft 365

  • Presentation technology / Industry insights
  • Comments: 2

You can do some really cool things in Microsoft Office with just a few lines of Visual Basic for Applications (VBA) - from creating your own custom formula in Excel to correcting branded content in PowerPoint to merging address data for a mail campaign in Word. And sometimes you need to share that VBA solution with colleagues and clients, via the Internet. A change that Microsoft rolled out at the end of March 2022 tweaks the process required by Windows users to gain access to this active content.

powerpoint vba copy slide to new presentation

Protecting your prized PowerPoint content

  • PowerPoint productivity / Presentation technology

Our comprehensive guide to password protecting PowerPoint files so your precious presentations stay just they you made them!

very simple, very explicit, very good help for a beginner vba programmer in powerpoint. Thanks

great resource, thanks. I’ve used VBA for years in MSaccess, and this is a good refresher for me.

I am trying to make a ppt file that loops until stopped. then I save it as a video. the ppt ran and looped continuously. Once recorded as video it stopped looping. do you have code to make ppt work when in video format

Hi Charles. As soon as you export a PowerPoint deck as a video all the PowerPoint functionality is removed as the file is magically transformed into an MP4 file, without VBA (sob sob). The only way to make the video loop is to use the looping feature of your video player.

Yeah, your best off recording a screen capture of the presentation running, then cutting it so it loops perfectly.

You can convert the video into gif file so that it will loop

Hi Jamie, thanks for the clear into, I am very new to this so that really helps. I am trying to develop a VBA macro that looks for the left hand mouse key being pressed and held down for more than two seconds whilst over a shape in slideshow mode. Once this is satisfied (i.e. two second press) for it then to hyperlink or take the user to a specified slide or even the next slide worst case.

I realise there is an automated/ built in feature (Action) that does this type of thing for a mouse click or mouse over but I really need a “long press” to activate if possible.

Any help appreciated.

Hi Simon and thanks for a great question. What you’re looking to do is pretty complex because VBA doesn’t natively support mouse actions in the PowerPoint slide show window. But, it is possible to use a Windows API (hence no Mac compatibility) called GetAsyncKeyState to gain access to mouse button click events. I had a look at this and quickly ran into a brick wall because an action link to a macro in slide show mode (Insert / Action / Mouse Click / Run macro) fires on the mouse up event, not mouse down. That means any corresponding VBA timer code can’t run until after the user releases the button and hence too late to detect if it was held down for two seconds. Maybe something could be done with the mouse over event to simulate what you need to achieve? Another approach could be to use the mouse down event on an invisible userform although that is also getting very involved with multiple Windows APIs. Depending on what you’re trying to do, you could also start the timer on click one, change the colour of the clicked shape and show countdown text before reverting to the original colour. If the user clicks a second time before the time expires, then the hyperlink is fired.

Valuable app

Hello I have a question:

Private Sub CommandButton2_Click() ActivePresentation.FollowHyperlink _ Address:=”http://192.168.16.49/?OUT1=ON”, _ NewWindow:=False, AddHistory:=False ActivePresentation.SlideShowWindow.View.GotoSlide (2)

Now it opens Chrome. but how can i make it that it opens te address en afther that shut down chrome.

Hi Tom. Your example should open the default browser at the URL specified by the Address parameter. For more information on the FollowHyperlink method, see this Microsoft documentation: https://docs.microsoft.com/en-us/office/vba/api/powerpoint.presentation.followhyperlink

Thank you very much! It’s exactly what I needed.

I have tried using your randomizing macro with a powerpoint – I must be doing something wrong, because it isn’t putting the slides in random order. Please advise! I copied the macro exactly (using cut & paste), and thought I was following all the directions here for how to use it in the powerpoint. But, no random presentation of the slides. Boo hoo!

Hi Marya. Let’s check that VBA is installed and enabled on your machine. Can you add the following macro to the VBE project (just below the existing one) and try to run it from the PowerPoint window using Alt+F8?

Sub CheckVBA() MsgBox “it’s working” End Sub

Make sure the quotes are the straight type.

I am trying to format my title page so that the number displayed is equal to the linked slide and updates automatically wherever the slide is moved. For example “about us” is on slide #5 and linked, so it goes to slide 5 when you click on the word. I need the number (in a separate text box) to update automatically to the slide number location that the link goes to.

Hi Mary and thanks for the question. It looks like you’re interested in some kind of automated agenda slide builder. That’s a fair bit of code to create and quite complex as it needs to handle events from PowerPoint to detect when slides have moved. It could be possible to write a simpler macro which you run manually each time you want to update that title page. You’d need start by finding a way to identify which objects are your numerical indicators. For example, if you named your objects in the selection pane (Alt+F10) “Agenda Link”, then is simple macro could be a starting place for you: Sub UpdateAgendaNumbers() Dim oSld As Slide Dim oShp As Shape Dim LinkedSlideIndex As Long On Error Resume Next For Each oSld In ActivePresentation.Slides For Each oShp In oSld.Shapes If oShp.Name = “Agenda Link” Then If oShp.ActionSettings(ppMouseClick).Action = ppActionHyperlink Then If oShp.HasTextFrame Then LinkedSlideIndex = Split(oShp.ActionSettings(ppMouseClick).Hyperlink.SubAddress, “,”)(1) oShp.TextFrame.TextRange.Text = LinkedSlideIndex End If End If End If Next Next End Sub

Great wealth of information. Have never used macros before but was looking to use them to help with this situation. At work we use Work Orders (created in Power Point) and are looking to include a sequential number to them (print 50-100 copies of one slide with the numbers) and if possible would like the number to continue from the last printed number…been trying to find some code to help but not having much luck possible partly due to being new to macros

That’s definitely something we could help design for you Joshua. If you’d like to discuss further, please click the Contact button at the top of this page.

I tried this changing the font color of text within the textbox. I used this to change the font color on a mouse over:

Public Sub GraphicHover(ByRef oGraphic As Shape)

oGraphic.TextFrame.TextRange.Font.Color.RGB = RGB(0, 130, 202)

and it works just fine. But, when I move the mouse off the text box, onto the invisible rectangle with this code attached to the mouseover event, it doesn’t change the text color back to it’s original color and remains the color I changed it to mentioned above. I know the mouseover event is being triggered because I checked “Highlight when mouse over” and I am seeing the highlight on the invisible rectangle:

Public Sub ResetGraphicHover(ByRef oCover As Shape) Dim oSld As Slide Dim oShp As Shape Set oSld = oCover.Parent For Each oShp In oSld.Shapes With oShp.TextFrame.TextRange.Font.Color If .RGB = RGB(0, 130, 202) Then .RGB = RGB(121, 135, 156) End With Next End Sub

Any clue where my ResetGraphicHover is failing?

Hi Dave. I took your code and it works for me. You could add a debug line after the For Each… line in the rest macro to check that (a) it’s firing and (b) which shapes are being looked at on your slide. To do that, add this:

Debug.Print oShp.Name

After you run the slide show, check the output in the VBE Immediate pane (Ctrl+G to toggle it).

Hi I am creating an interactive game (matching cards or concentration) in PowerPoint. If the 2 cards match, I need a pop-up text box to appear. If the 2 cards do not match, I need a sound to play.

I understand I need programming to make this happen. Please help or give alternative ways to achieve this. Thanks.

Hi Tammy. Have a look at this article which will help you: https://www.brightcarbon.com/blog/powerpoint-memory-game/

Hi Producer I will like to get comments on macros you can make available to me. Beautiful. I am using this approach frequently to make offline projects. Thanks. S. Fas

Excellent!!! Thank you!

You’re more than welcome Nataša!

Thank you! Is there any option to replace a font in the entire presentation for a specific character. Let’s say, I would like to change font only for dots in the deck but I would like to keep the rest in the original font. Any idea please? Thank you so much!

Hi Jan. You might be able to use the Replace Fonts feature found in the Home tab of PowerPoint under the Replace menu at the far end of the ribbon. If you need to use VBA then set up a nested loop to iterate all shapes within all slides and then use the oShp.TextFrame2.TextRange.Font object to change the font.

Exellent explenation. so beutiful. I am creating an interactive e learing quiz. Thanking you.

Hello! I have a client who’s interested in using tagging to help create searchable content within slides. For example, they have four different categories for slide content across multiple presentations (Overview, Market, Product, Country). I’d like to assign a different shape to represent each of the four categories, where a blue square might represent Overview slide content. Then, when someone uses the keyword “Overview” to search for overview content (on Teams or SharePoint), these slides are easily identified. Is this something that’s possible with VBA code?

Hi Linda. That’s a very good question! Given the need is to search via SharePoint, VBA probably won’t help here as the PowerPoint file needs to be opened for VBA to examine its content. I have a sneaking suspicion that if you add keywords in the Tags field under File / Info that SharePoint may use this. But, that’s at the file level rather than the slide level. We have a PowerPoint add-in called ShowMaker that might be of interest as it allows you to add category metadata to slides and then the presenter can use that to filter the deck and export the required content. You can find an overview of it here: https://www.brightcarbon.com/showmaker/ and we could set up a demo if you’re interested (please use the Contact button at the top of this page if that’s the case).

I’ve just created an elearning package in PowerPoint using VBA , I didn’t realise it could sum up text boxes within PowerPoint to mark the qualification at the end. Also used AWS text to speech over the top of the learning . Looks great

Sounds like a fun and successful project Stu! Thanks for sharing 🙂

I have a bit of a tricky one but hoping it is possible to do with VBA. We offer training services to multiple clients that can be customized but the majority of training is consistent from one client to the next (main changes are the slide masters/formatting and addition/removal of certain sections).

What we want to do is create one master (or multiple) training document(s), and then use VBA’s to link it to the client specific PowerPoint. We want to link the master rather than using the “reuse slide” command so that if we update one file the other will automatically update as well.

Not sure if it matters, but our company uses sharepoint as storage

Hi Dave and thanks for a great question. VBA is an excellent solution for automating a manual process. In general, if a person can perform a task manually via a sequence of pre-defined steps then VBA can do it automatically, faster, and with less chance of mistakes for something done many times. We’d be happy set up a call to discuss your needs further and see what could be automated with VBA. If that’s of interest, please use the contact button at the top of the page and mention my name in the form.

PP does not seem to have the record macro feature. To write vba code in PP by someone who only worked with vba in excel, would require some prior knowledge. Is there a summary of the most common objects, methods etc to refer to?

Hi Reef. You’re correct that there’s no VBA macro recording feature in newer versions of PowerPoint. The best place to start learning is by purchasing a book (there’s one called “Mastering VBA for Microsoft Office 365” on Amazon or reading the extremely exciting Object Model documentation from Microsoft: https://docs.microsoft.com/en-us/office/vba/api/overview/powerpoint/object-model

Hi Greeting I had made a game in power point using VBA codes. At last it generate a report every time a candidate conduct the game . My requirement is to generate result in same excel sheet after conducting the game. Like Row 1 player 1 result Row 2 player 2 result I need your help Regards

Hi Asheesh. It’s possible to use VBA to get PowerPoint to “talk” to Excel (and other Office apps) but it’s a bit complicated to mention in a comment here. We’d be happy to help if you’d like a quote or if you want to try yourself you could start with this: Set oXL = CreateObject(“Excel.Application”) and have a look at some online examples. I’d also recommend the book “Mastering VBA for Microsoft Office 365” available from Amazon.

If there are two colors of font in the textFrame, how to change the font of one color through VBA?

Hi Bruce. You could either iterate through the Characters collection of the TextRange2 object or the Runs collection which returns all of the TextRanges with the same style. Example: ActiveWindow.Selection.ShapeRange(1).TextFrame2.TextRange.Runs(1).Font.Fill.ForeColor.RGB

Hi – can you help, please?

How can I change the font color and size of the message box? What code will work and where will I put it? Creating an interactive game in powerpoint. Thank you!

—– Sub Correct() Points.Caption = (Points.Caption) + 10 Output = MsgBox(“Your answer is correct, well done!”, vbOKOnly, “Correct Answer”) ActivePresentation.SlideShowWindow.View.Next End Sub

Sub Incorrect() Points.Caption = (Points.Caption) – 5 Output = MsgBox(“Your answer is incorrect.”, vbOKOnly, “Wrong Answer”) ActivePresentation.SlideShowWindow.View.Next End Sub

Sub Reset() SlideLayout.Points.Caption = 0 ActivePresentation.SlideShowWindow.View.Exit End Sub ———-

Thanks for your explanation.

Hi Jamie, Is there any way to keep my macro save in a file so I can utilize on any other PPTs equivalent as.normal.dotm for Word, .xlam(add-in) for Excel.

Hi Anurag. Thanks for the question and Happy New Year! The best way to do this would be to export your project as a ppam and activate it as an add-in via the PowerPoint add-ins UI. Save your ppam in %AppData%\Microsoft\AddIns and then in the Windows PowerPoint Developer tab, click PowerPoint Add-Ins and add your ppam from there. If you’re not code-signing your VBA project, you may need to adjust Trust Centre settings. You could optionally build an EXE/MSI installer package for Windows and PKG for macOS, although that is a more complex topic.

Join the BrightCarbon mailing list for monthly invites and resources

First of all the deck looks great, once again you guys have done an outstanding job. Second, I’d like to comment on the quality of the training provided by your colleagues - quite simply it was exceptional. I have spoken to the whole team and that view is unanimous. Please pass this on. James Bagan MyLife Digital

powerpoint vba copy slide to new presentation

MrExcel Message Board

  • Search forums
  • Board Rules

Follow along with the video below to see how to install our site as a web app on your home screen.

Note: This feature may not be available in some browsers.

  • If you would like to post, please check out the MrExcel Message Board FAQ and register here . If you forgot your password, you can reset your password .
  • Question Forums
  • Excel Questions

copy a slide of a powerpoint presentation in Excel/VBA

  • Thread starter scylllla
  • Start date Aug 31, 2019
  • Tags copy create powerpointapp ppt slide
  • Aug 31, 2019

Hi, Im trying to copy a slide in a ppt using the following code: Code: Sub openppt() Dim PowerPointApp As PowerPoint.Application Set PowerPointApp = CreateObject("PowerPoint.Application") PowerPointApp.Presentations.Open ("C:\test\template.pptx") ActivePresentation.Slides(1).Duplicate End Sub the ppt opens correctly but everything I trying to do with it results in a error: "activex component can't create object" what is going wrong here?  

Excel Facts

Mrexcel mvp.

You'll need to qualify your reference... Code: PowerPointApp.[COLOR=#574123]ActivePresentation.Slides(1).Duplicate[/COLOR] Also, since you're using early binding, you can use the New keyword instead of CreateObject to create an instance of the PowerPoint Application object... Code: Set PowerPointApp = New PowerPoint.Application Also, your code can be re-written as follows... Code: Sub openppt() Dim PowerPointApp As PowerPoint.Application Set PowerPointApp = New PowerPoint.Application Dim PowerPointPres As PowerPoint.Presentation Set PowerPointPres = PowerPointApp.Presentations.Open("C:\test\template.pptx") PowerPointPres.Slides(1).Duplicate End Sub Hope this helps!  

  • Sep 1, 2019

That helps a lot. Thx! Extra question: How do I place the new slide at the right destination, I mean I want to put it at the end or just as number 7.  

To move the duplicate slide after the last slide in the presentation, try... Code: Sub openppt() Dim PowerPointApp As PowerPoint.Application Set PowerPointApp = New PowerPoint.Application Dim PowerPointPres As PowerPoint.Presentation Set PowerPointPres = PowerPointApp.Presentations.Open("C:\test\template.pptx") Dim PowerPointSlideRange As PowerPoint.SlideRange Set PowerPointSlideRange = PowerPointPres.Slides(1).Duplicate With PowerPointPres PowerPointSlideRange(1).MoveTo toPos:=.Slides.Count End With End Sub To move the duplicate slide to a specific location, let's say 7, replace... Code: With PowerPointPres PowerPointSlideRange(1).MoveTo toPos:=.Slides.Count End With with Code: PowerPointSlideRange.MoveTo toPos:=7 Alternatively, instead of using the Duplicate method, you can use copy/paste. So, for example, to copy the first slide and paste it after the last slide in the presentation... Code: With PowerPointPres .Slides(1).Copy .Slides.Paste End With To place it at a specific location... Code: With PowerPointPres .Slides(1).Copy .Slides.Paste Index:=7 End With Hope this helps!  

With PowerPointPres PowerPointSlideRange(1).MoveTo toPos:=.Slides.Count End With ​ Click to expand...

The Duplicate method does not allow one to specify the destination. It simply creates a duplicate of the specified slide, and then places it immediately after the specified slide. Here's the Microsoft reference for the Duplicate method... https://docs.microsoft.com/en-us/of...tFrameworkMoniker-Office.Version=v16)&rd=true  

Billy Bryant

  • May 3, 2022
Domenic said: You'll need to qualify your reference... Code: PowerPointApp.[COLOR=#574123]ActivePresentation.Slides(1).Duplicate[/COLOR] Also, since you're using early binding, you can use the New keyword instead of CreateObject to create an instance of the PowerPoint Application object... Code: Set PowerPointApp = New PowerPoint.Application Also, your code can be re-written as follows... Code: Sub openppt() Dim PowerPointApp As PowerPoint.Application Set PowerPointApp = New PowerPoint.Application Dim PowerPointPres As PowerPoint.Presentation Set PowerPointPres = PowerPointApp.Presentations.Open("C:\test\template.pptx") PowerPointPres.Slides(1).Duplicate End Sub Hope this helps! Click to expand...

Similar threads

  • Dec 9, 2022
  • Jan 14, 2023
  • Feb 1, 2023

Fluff

  • Jun 8, 2023

sijpie

  • Jul 18, 2023

Forum statistics

Share this page.

powerpoint vba copy slide to new presentation

We've detected that you are using an adblocker.

Which adblocker are you using.

AdBlock

Disable AdBlock

powerpoint vba copy slide to new presentation

Disable AdBlock Plus

powerpoint vba copy slide to new presentation

Disable uBlock Origin

powerpoint vba copy slide to new presentation

Disable uBlock

powerpoint vba copy slide to new presentation

How-To Geek

How to duplicate slides in microsoft powerpoint.

Want to duplicate a slide in PowerPoint without having to manually redesign the entire slide? Here's how it's done.

If you want to reuse a slide that appears on your presentation, but you don’t want to manually redesign the entire slide , you can duplicate it instead. Here’s how to duplicate slides in Microsoft PowerPoint.

Duplicating a slide is nothing more than copying and pasting the desired slide. However, there are multiple ways to achieve this low-effort task. We’ll go through each method.

Related: How to Cut, Copy, and Paste in Microsoft Word

The first method is using the “Duplicate Slide” method. Start by opening your slideshow and then selecting the slide thumbnail that you’d like to duplicate.

Once selected, right-click the slide and a menu will appear. Select “Duplicate Slide” from the menu.

The slide will now be duplicated. It will appear immediately after the source slide.

If you want the duplicated slide to appear somewhere else, you can simply click and drag the slide to the desired location.

Another method is to copy and paste the slide to be duplicated. Select the slide you’d like to copy and then press Ctrl+C (Command+C on Mac) to copy the slide to your clipboard.

Related: How to Combine PowerPoint Presentations

Alternatively, right-click the slide and then select “Copy” from the menu.

Unlike the “Duplicate Slide” option, you can select where you want the copied slide to be pasted. To do this, select the area between the two slides that you’d like your slide to appear. You’ll know it’s selected when you see a bar appear between the two slides.

Now press Ctrl+V on your keyboard (Command+V on Mac) to paste the slide.

Alternatively, right-click the bar between the two slides and then select the left-most clipboard under “Paste Options” from the menu that appears.

The copied slide will now be pasted to the selected location.

VBA Copy/Paste Multiple Excel Ranges To PowerPoint Slides

Copy Paste Multiple Excel Ranges To Multiple PowerPoint Slides With VBA

Stop Manually Copying and Pasting!

This post is a continuation of the current most popular blog post on The Spreadsheet Guru website.  This post was entitled  Copy & Paste An Excel Range Into PowerPoint With VBA .  A ton of readers emailed me and asked for guidance on how to copy multiple Excel ranges across multiple PowerPoint slides.  

Instead of answering everyone's questions individually, I thought I would put a quick post together to show how you can turn the VBA macro code provided in the aforementioned post into a mean green transferring machine! Once again I will give you the whole VBA subroutine first and highlight the few tweaks made to the code.  Enjoy!

Using Arrays To Your Advantage

I often like to refer to one-dimensional arrays as lists and they are incredibly useful when automating routine tasks such as copying & pasting data.  In the code above you will see two array lists.  One will be used to store which Excel ranges you want to copy and the other will store which PowerPoint slides to paste to.  When these arrays are perfectly aligned (ie the second range array item belongs with the second slide array item), the real automation begins.  

As you can see in the above code snippet, I am referencing ranges in different worksheets, and if you are really up for the challenge you can even reference and pull in data from different Excel workbooks!

Looping Through The Array Content

This snippet of code ensures that you are looping through every single piece of data inside your arrays.  By using the LBound (lower bound) and UBound (upper bound) functions, you can ensure that your loop statement cycle through the proper amount of times.  If you ever need to increase or decrease your array list (ie need to copy and paste more or fewer amounts of data into your slides), this part of the code will never need to be changed because it is dynamically structured!

NOTE : There seems to be some sort of bug when trying to set the shp variable to the recently pasted image.  In Office 2007 and 2010 you can set the variable on the same line as the PasteSpecial.  This however causes an error in Office 2013.  Likewise, in 2013 you can set a ShapeRange variable equal to the selected shape (a newly pasted shape is automatically selected), however, in 2007/2010 you will receive an error.  My "fix" was to try and execute both lines of code and ignore whichever line errors out.  If anyone has a better way of handling this or knows why this is happening please leave a comment so we can post the best solution in the article! 

Center Image To Middle Of The Slide

I pulled this snippet from my Center Shapes on Slide article . The calculations use the height and width of both the pasted image and the PowerPoint slide to find the exact center. By changing the pasted image's Left and Top positions, every image will be right in the middle of the slide.  

Of course, if you have specific locations on the slide for your images you can spell those out by using the Left , Top , Height , and Width properties.  Use the VBA snippet from the Code Vault post  Retrieve the Dimensions of a Shape in PowerPoint  to determine what those values should be.  

Also if you are changing the image's size ratio, make sure to  Unlock an Image’s Aspect Ratio ,  or else you will not get your desired image size.

Never Copy & Paste Into PowerPoint Again!

And there you have it, you now know how to automate the creation of your PowerPoint slides!  So what are you going to do with all your extra saved time?  Leave a comment below and let everyone know what you are now able to do since you don't have to sit in front of your computer and copy/paste data all day!  I look forward to reading your comments (feel free to be witty)!

Also, I now have an add-in that will do this process for you (and much more!). Check it out by clicking the banner -->

Never Copy & Paste Into PowerPoint Again!

Download Example Excel File

If you would like to get a copy of the Excel file I used throughout this article, feel free to directly download the spreadsheet by clicking the download button below.

After 10+ years of creating macros and developing add-ins, I've compiled all the hacks I wish I had known years ago!

Hidden Hacks For VBA Macro Coding

Keep Learning

Copy & Paste Multiple Excel Tables Into Microsoft Word With VBA

Copy & Paste Multiple Excel Tables Into Microsoft Word With VBA

Moving Excel Tables Into Various Word Pages  This post is an add-on to a previous post I wrote covering how...

Resize An Oversized Pasted PowerPoint Image

Resize An Oversized Pasted PowerPoint Image

What This VBA Code Does Ever paste in a picture or chart to your PowerPoint presentation and it's huge...like so...

Best Way To Paste Special Excel Objects As PowerPoint Images

Best Way To Paste Special Excel Objects As PowerPoint Images

Quality Matters I've written many times in the past on how the quality and formatting of your work can separate...

Chris Newman

Chris Newman

Chris is a finance professional and Excel MVP recognized by Microsoft since 2016. With his expertise, he founded TheSpreadsheetGuru blog to help fellow Excel users, where he shares his vast creative solutions & expertise. In addition, he has developed over 7 widely-used Excel Add-ins that have been embraced by individuals and companies worldwide.

Working with multiple presentations

To open another presentation, in the File tab, choose Open or click Ctrl+O and select the presentation.

When more than one presentation is open, you can switch among them by selecting the one you want to see from the taskbar in Windows. E.g.:

Windows PowerPoint 365

Alternatively, you can do one of the following:

   1.   On the View tab, in the Window group, click the Switch Windows button:

Switch Windows in PowerPoint 365

Select any open presentation from there:

Switch Windows in PowerPoint 365

   2.   Switch between open windows of all applications by:

  • holding down the Alt key and pressing Tab to browse thumbnails of open windows ( Alt+Tab ) - not just PowerPoint;
  • pressing Alt+Esc repeatedly to cycle through them - not just PowerPoint;
  • pressing Ctrl+F6 to switch between just PowerPoint presentations.

See also this tip in French: Travailler avec plusieurs présentations .

Please, disable AdBlock and reload the page to continue

Today, 30% of our visitors use Ad-Block to block ads.We understand your pain with ads, but without ads, we won't be able to provide you with free content soon. If you need our content for work or study, please support our efforts and disable AdBlock for our site. As you will see, we have a lot of helpful information to share.

Working with multiple presentations

Open presentations

  • My Allegheny
  • A-Z Resources
  • Student Resources
  • Office of the President
  • Give to Allegheny

Information Technology Services

Tip tuesday: export to powerpoint from keynote on mac.

By Doug Anderson May 4th 2021

Many Mac users create presentations in the Keynote app, but may need to share what they’ve created in a PowerPoint or Google Slides file format.

To save a copy of a Keynote presentation in another format, you  export  it in the new format. Any changes made to the exported presentation don’t affect the original.

Save a copy of a Keynote presentation in another format

The File menu open in Keynote with "Export To" selected and its submenu showing export options for PDF, PowerPoint, Movie, HTML, Images, and Keynote ’09.

  • You may be offered the option to set a password for the exported file, keep or change an existing password, or export without a password.
  • Click Next , then type a name for the presentation.
  • To choose where to save the presentation, click the Where pop-up menu, choose a location, then click Export .
  • Your exported file can now be opened in MS PowerPoint, or uploaded to your Google Slides .

Subscribe to get LITS News and Updates in your inbox .

powerpoint vba copy slide to new presentation

Microsoft Learn Q&A needs your feedback! Learn More

May 20, 2024

Microsoft Learn Q&A needs your feedback!

Want to earn $25 for telling us how you feel about the current Microsoft Learn Q&A thread experience? Help our research team understand how to make Q&A great for you.

Find out more!

Contribute to the Microsoft 365 and Office forum! Click  here  to learn more  💡

April 9, 2024

Contribute to the Microsoft 365 and Office forum!

Click  here  to learn more  💡

PowerPoint Forum Top Contributors: Steve Rindsberg  -  John Korchok  -  Bob Jones AKA: CyberTaz   ✅

May 10, 2024

PowerPoint Forum Top Contributors:

Steve Rindsberg  -  John Korchok  -  Bob Jones AKA: CyberTaz   ✅

  • Search the community and support articles
  • Microsoft 365 and Office
  • Search Community member

Ask a new question

Why does powerpoint not spell check slides that are created via duplicate slide method

So when working in powerpoint I have noticed that if you create a new slide spell check will pick up on spelling errors etc. however, if you duplicate a slide to copy the formatting etc. as to not waste time doing it all manually, it misses all errors.

Why does this happen? How can I get it to also spell check the duplicated slides.

Many Thanks,

  • Subscribe to RSS feed

Report abuse

Reported content has been submitted​

Replies (2) 

  • Microsoft Agent |

 Dear Jenni Stanley,

Good day. Thank you for posting to Microsoft community.

Based on your description, I tested it on my side, and I can’t reproduce your scenario.

I typed a wrong word in PowerPoint Slide and then right clicked it, selected Duplicate the Slide, and it appeared the same as the first slide. It didn’t miss the error.

powerpoint vba copy slide to new presentation

I also tested with pressing the Command + C / Command +V. It appeared the same scenario.

Here are some steps might work for you:

Please run the safe mode on mac. Reference for you: support.apple.com

Please clear the PowerPoint cache, sometimes this behavior may fix some crash issue. You can open the Finder > Go > Go to, and enter this path:

/user/<username>/Library/Containers/Microsoft. Word/Data/Library/Caches

Note : please replace <username> with your own username.

If it doesn’t work for you, let me know more information about it. You can upload a screenshot to show the issue. Also, please provide me the PowerPoint version an let me know if the issue only happened on this presentative.

Thank you for your patience an understanding.

Claire | Microsoft Community Moderator

Was this reply helpful? Yes No

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

Thanks for your feedback.

Thanks for the speedy response.

I just tried with a new document and also didn't repeat the problem. Its seems to only be a problem when using a template.

I tried to clear the powerpoint cache like you directed however, there was nothing for powerpoint in that folder.

I will try some updates etc. to powerpoint, as I see there is one, and see if that works.

Question Info

  • For business
  • Norsk Bokmål
  • Ελληνικά
  • Русский
  • עברית
  • العربية
  • ไทย
  • 한국어
  • 中文(简体)
  • 中文(繁體)
  • 日本語

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Shape.Copy method (PowerPoint)

  • 6 contributors

Copies the specified object to the Clipboard.

expression . Copy

expression A variable that represents a Shape object.

Use the Paste method to paste the contents of the Clipboard.

If the shape is not fully downloaded, this method fails and an error occurs. For more information about the Partial Documents, see Work with Partial Documents .

This example copies shapes one and two on slide one in the active presentation to the Clipboard and then pastes the copies onto slide two.

Shape Object

Work with Partial Documents

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.

Was this page helpful?

Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see: https://aka.ms/ContentUserFeedback .

Submit and view feedback for

Additional resources

IMAGES

  1. How to use VBA in PowerPoint: A beginner's guide

    powerpoint vba copy slide to new presentation

  2. VBA PowerPoint

    powerpoint vba copy slide to new presentation

  3. How to Copy Slides from One Presentation to Another in PowerPoint

    powerpoint vba copy slide to new presentation

  4. How to Copy a Slide in PowerPoint

    powerpoint vba copy slide to new presentation

  5. VBA PowerPoint

    powerpoint vba copy slide to new presentation

  6. How-to Guide: Copy Slides From One PowerPoint to Another

    powerpoint vba copy slide to new presentation

VIDEO

  1. How To Goto Slide With Vba 3

  2. How to copy a text or shape in a slide to all slides of Powerpoint using Macro

  3. How to insert SLIDES into existing PowerPoint using VBA -Your Question My solution

  4. Powerpoint VBA : การสร้างแบบทดสอบที่เก็บคะแนนลงฐานข้อมูล

  5. Tutorial VBA Powerpoint 2007 Browsed at a kiosk

  6. How to create a beautiful PowerPoint presentation using ChatGPT

COMMENTS

  1. Copy Slides From One Presentation to Another (VBA for PowerPoint)

    In this article I will explain how you can copy slides from one PowerPoint presentation to another using VBA. Example 1 Sub main() Dim objPresentation As Presentation Dim i As Integer 'open the target presentation Set objPresentation = Presentations.Open("C:\2.pptx") For i = 1 To objPresentation.Slides.Count objPresentation.Slides.Item(i).Copy Presentations.Item(1).Slides.Paste Next i ...

  2. Slide.Copy method (PowerPoint)

    ActivePresentation.Slides(1).Copy See also. Slide Object. Work with Partial Documents. Support and feedback. Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.

  3. Copy Selected Slides Into New PowerPoint Presentation

    myArray(y + 1) = Swap. SortTest = True End If Next y. Loop Until Not SortTest. . 'Set variable equal to only selected slides in Active Presentation (in numerical order) Set Selected_slds = OldPPT.Slides.Range(myArray) 'Create a brand new PowerPoint presentation Set NewPPT = Presentations.Add. .

  4. How to copy powerpoint sections to a new presentation using VBA

    If you want to copy slides with their sections, then you can not paste the slide by newPresentation.Slides.Paste only, as that moves the section of the last slide to the newly pasted slide. Here's an example how to copy slide-by-slide, check if a slide is the beginning of a section, and how to add a new section then:

  5. Copy slide from one presentation into another VBA

    The macro I have made so far opens the existing file, and then opens a new blank presentation. I need the macro to copy from the first opened powerpoint and then copy and paste into the second. This will occur on a loop connected to another macro, so I need the slide to be pasted underneath any pre-existing slides in the new presentation.

  6. PowerPoint VBA Macro Examples & Tutorial

    Copy Selected slides to new PPT Presentation. To copy certain slides to a new presentations, first select the desired slides in the existing presentation and then run the code below; ... To use VBA in PowerPoint, open the VBA Editor (ALT + F11 or Developer > Visual Basic).

  7. VBA: PowerPoint

    1. Creating a new presentation, getting pictures and data ranges from an existing Excel file and formatting those. Sub CreateNewPresentation () Dim ppApp As PowerPoint.Application. Dim ppPres As PowerPoint.Presentation. Dim ppSlide As PowerPoint.Slide. Set ppApp = New PowerPoint.Application. ppApp.Visible = True.

  8. How to use VBA in PowerPoint: A beginner's guide

    Getting to meet your VBA friend is very simple. With PowerPoint open and at least one presentation file open, press Alt+F11* on your keyboard. This will open the VBE (Visual Basic Editor): *If for some reason Alt+F11 isn't mapped on your keyboard you can right click anywhere on the ribbon, select Customize the Ribbon… and in the window that ...

  9. Presentation.SaveCopyAs method (PowerPoint)

    This example saves a copy of the active presentation under the name "New Format Copy.ppt." By default, this copy is saved in the format of a presentation in the current version of PowerPoint. The presentation is then saved as a PowerPoint 4.0 file named "Old Format Copy." VB. Copy.

  10. Slide.Duplicate method (PowerPoint)

    In this article. Creates a duplicate of the specified Slide object, adds the new slide to the Slides collection immediately after the slide specified originally, and then returns a Slide object that represents the duplicate slide.. Syntax. expression.Duplicate. expression A variable that represents a Slide object.. Return value. SlideRange. Example. This example creates a duplicate of slide ...

  11. Copying and pasting a slide in PowerPoint VBA

    The first slide is the three options (Do you want a picture, multiple choice...etc), the second could be a picture question, the third, a multiple choice and the fourth, a normal question. When they start the slide show and click on multiple choice, for instance, slide 3 will be copied and pasted behind the current slide and, within the VB, it ...

  12. copy a slide of a powerpoint presentation in Excel/VBA

    Code: With PowerPointPres. PowerPointSlideRange(1).MoveTo toPos:=.Slides.Count. End With. with. Code: PowerPointSlideRange.MoveTo toPos:=7. Alternatively, instead of using the Duplicate method, you can use copy/paste. So, for example, to copy the first slide and paste it after the last slide in the presentation...

  13. How to Duplicate Slides in Microsoft PowerPoint

    Another method is to copy and paste the slide to be duplicated. Select the slide you'd like to copy and then press Ctrl+C (Command+C on Mac) to copy the slide to your clipboard. Related: How to Combine PowerPoint Presentations. Alternatively, right-click the slide and then select "Copy" from the menu.

  14. VBA Copy/Paste Multiple Excel Ranges To PowerPoint Slides

    Stop Manually Copying and Pasting! This post is a continuation of the current most popular blog post on The Spreadsheet Guru website. This post was entitled Copy & Paste An Excel Range Into PowerPoint With VBA.A ton of readers emailed me and asked for guidance on how to copy multiple Excel ranges across multiple PowerPoint slides.

  15. Save presentations

    1. On the File tab, click Options : 2. In the PowerPoint Options dialog box, on the Save tab, under Save presentations : In the Save files in this format dropdown list, choose the default format to appear on the Save As pane or Save As dialog box (see the descriptions of these formats above): Click the Save AutoRecover information every ...

  16. Working with multiple presentations

    Alternatively, you can do one of the following: 1. On the View tab, in the Window group, click the Switch Windows button: Select any open presentation from there: 2. Switch between open windows of all applications by: pressing Ctrl+F6 to switch between just PowerPoint presentations. See also this tip in French: Travailler avec plusieurs ...

  17. Slides.Paste method (PowerPoint)

    You can paste the following from the Clipboard. Slide view or notes page view. Shapes, text, or entire slides. If you paste a slide from the Clipboard, an image of the slide will be inserted onto the slide, master, or notes page as an embedded object. If one shape is selected, the pasted text will be appended to the shape's text; if text is ...

  18. How to copy slides to or from another presentation

    On the Home tab, in the Clipboard group, click the Copy button (or press Ctrl+C ): Right-click on the selection and choose the Copy command from the popup menu: 5. In the working (destination) presentation, do one of the following: Select the thumbnail after which you want to insert the copied slide (s) or click the empty area after the thumbnail.

  19. How To Use PowerPoint Design Ideas

    PowerPoint Windows: Go to File > Options. In the General tab, you'll see the options for PowerPoint Designer. There are a couple of choices for you: If you want to automatically show design ideas every time you click on Design Ideas, then you should tick the option that says ' Automatically show me design ideas.

  20. Shapes in slide master cannot be edited (in the slide master ...

    I want to edit the shape on the slide master view after content slides are added. Try this: Open new, blank PPT In Slide Master view, add a circle shape and make it blue Go to Normal View and add a slide with random letters Go back to Slide Master view and try to change the position and color of the circle you added earlier. Can't do it.

  21. Tip Tuesday: Export to PowerPoint from Keynote on Mac

    Many Mac users create presentations in the Keynote app, but may need to share what they've created in a PowerPoint or Google Slides file format. To save a copy of a Keynote presentation in another format, you export it in the new format. Any changes made to the exported presentation don't affect the original.

  22. Copy PowerPoint Master Design Using VBA

    What i want to do, just import or copy the design from source to destination but not apply. Please advise. Thank you. Please find the code below. Sub ImportTemplate() ActivePresentation.ApplyTemplate "Source Template Path". End Sub. This imports the template but at the same time applies to the slides also. But I just want to import, not apply.

  23. Why does powerpoint not spell check slides that are created via

    Hi there,So when working in powerpoint I have noticed that if you create a new slide spell check will pick up on spelling errors etc. however, if you duplicate a slide to copy the formatting etc. as ... I typed a wrong word in PowerPoint Slide and then right clicked it, selected Duplicate the Slide, and it appeared the same as the first slide. ...

  24. Slides.AddSlide method (PowerPoint)

    The following example shows how to use the Add method to add a new slide to the Slides collection. It adds a new slide in index position 2 that has the same layout as the first slide in the active presentation. VB. Copy. Public Sub Add_Example()

  25. I need more free resources (photos, icons, fonts) for my presentation

    Suitable for PowerPoint and Google Slides Download your presentation as a PowerPoint template or use it online as a Google Slides theme. 100% free, no registration or download limits. Content

  26. Osaka Mini PowerPoint and Google Slides Template

    Explore your creativity with this Osaka Inspired PowerPoint and Google Slides template. Designed specifically for marketing professionals, its illustrative style, and cute pastel colors make it apt for educational and marketing presentations. Feel the vibrant culture of Osaka with the yellow, pink, and green color palette.

  27. How do I copy a Shape from one Powerpoint presentation to another in VBA?

    I have VBA code to copy shapes matching a certain criteria from one Powerpoint presentation to another below. However, when it pastes the shape, it is offset (down and to the right) from the original position. ... PowerPoint VBA - Copy shape to a slide. 1. Copy paste shape by using VBA in PowerPoint. 0.

  28. CustomLayout.Copy method (PowerPoint)

    In this article. Copies the specified object to the Clipboard. Syntax. expression.Copy. expression A variable that represents a CustomLayout object.. Remarks. Use the Paste method of the CustomLayouts object to paste the slides on the Clipboard into a custom layout and add the custom layout to the CustomLayouts collection.. See also. CustomLayout Object. Support and feedback

  29. How should I copy and paste a powerpoint slide KEEPING SOURCE

    To anyone struggling with the same issue, here is the subroutine that I managed to create. The objDestPresentation should be a Presentation Object and the sourceSlideRange should be a SlideRange Object.. This will copy the slides from sourceSlideRange to the end of the objDestPresentation.Hopefully this will save someone some of the struggle that I went through!

  30. Shape.Copy method (PowerPoint)

    This example copies shapes one and two on slide one in the active presentation to the Clipboard and then pastes the copies onto slide two. With ActivePresentation .Slides(1).Shapes.Range(Array(1, 2)).Copy .Slides(2).Shapes.Paste End With See also. Shape Object. Work with Partial Documents. Support and feedback