Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-25-2023, 08:52 AM
Dan_nn Dan_nn is offline Need Macro to Copy Notes from one PPT to another Windows 10 Need Macro to Copy Notes from one PPT to another Office 2021
Novice
 
Join Date: Apr 2023
Posts: 7
Dan_nn is on a distinguished road
Default

Hey, I've uploaded a slightly customized version of the script already inserted in a macro-enabled Powerpoint file (pptm). Feel free to use it.



Here's the actual script I'm using:

Code:
Sub switchNotes(mySource As String, myTarget As String)
' Target and Source files should be open
' oSource and oTarget should be filled with filename (no path) // now passed via arguments
' call switchNotes("SOURCE NOTES","TARGET contains localized graphics")
' source means source notes.
' use with 'call switchNotes()'
' 'On Error Resume Next' commented out to spot failed process
' MsgBox used for debug purposes when needed

Dim oTarget As Presentation
Dim oSource As Presentation
Dim i As Integer
'On Error Resume Next
Set oSource = Presentations(mySource)
Set oTarget = Presentations(myTarget)
If oSource.Slides.Count <> oTarget.Slides.Count Then Err.Raise -10000000
For i = 1 To oSource.Slides.Count
'MsgBox ("diapo " & i)
oSource.Slides(i).NotesPage.Shapes(2).TextFrame.TextRange.Copy
oTarget.Slides(i).NotesPage.Shapes(2).TextFrame.TextRange.Paste
Next i
End Sub
So, you need to open this file, and additionally open the 2 other files:
- The source, where you already have the notes.
- The target, where you want the notes copied over.

Take note of the filename of those files, let's say the source is called "myPowerpointFile.pptx" and the target is called "myBlankpowerpointFile.pptx".

So now you have the 3 files open.

While viewing the script file ("speaker notes copy script.pptm"), hit alt+F11 and it will open the scripting interface. Check if you have the "Immediate" pane open. If it's not, go to View > Immediate Window, so you open it.

While on the Immediate Window, type:
Code:
call switchNotes("myPowerpointFile.pptx","myBlankpowerpointFile.pptx")
(please note I've used the example filenames, update matching YOUR own filenames).

That's it... if you see any error, try re-running it (sometimes, for a reason I don't know, it may fail the first attempt).

Good luck with it
Attached Files
File Type: pptm speaker notes copy script.pptm (37.5 KB, 8 views)
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
PowerPoint Macro - Copy and Replace pictures from one PPT to another PPT mrayncrental PowerPoint 2 06-09-2014 02:52 AM
Macro to copy formula from one cell to another anwar Excel Programming 1 04-25-2014 08:27 PM
Need Macro to Copy Notes from one PPT to another Word macro: copy from different tables into one table adisl Word VBA 4 03-25-2014 02:40 AM
Need Macro to Copy Notes from one PPT to another How to do an automation for copy paste, added new row (macro) jpol Excel Programming 1 03-01-2013 05:53 AM
Powerpoint copy notes no1_titch PowerPoint 0 09-07-2010 06:16 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:47 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft