View Single Post
 
Old 09-25-2023, 08:52 AM
Dan_nn Dan_nn is offline Windows 10 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, 3 views)
Reply With Quote