Created
June 25, 2016 13:21
-
-
Save joswr1ght/6b6d9878c4acd85a1a20f19ece99b56e to your computer and use it in GitHub Desktop.
PowerPoint macro to replace double empty paragraph markers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Replace all double paragraph carriage returns in PowerPoint Notes. | |
' Also handles multiple Notes pages per slide. | |
Sub NotesFix() | |
Dim osld As Slide | |
Dim oshp As Shape | |
Dim strNotes As String | |
For Each osld In ActivePresentation.Slides | |
For Each oshp In osld.NotesPage.Shapes | |
If oshp.HasTextFrame Then | |
If oshp.TextFrame.HasText Then | |
' Replace \r\r with \r (PowerPoint doesn't use CRLF in notes, just CR -- go figure) | |
oshp.TextFrame.TextRange.Text = Replace(oshp.TextFrame.TextRange.Text, "!" & Chr(13) & Chr(13), "!" & Chr(13)) | |
oshp.TextFrame.TextRange.Text = Replace(oshp.TextFrame.TextRange.Text, ". " & Chr(13) & Chr(13), "." & Chr(13)) | |
oshp.TextFrame.TextRange.Text = Replace(oshp.TextFrame.TextRange.Text, "." & Chr(13) & Chr(13), "." & Chr(13)) | |
oshp.TextFrame.TextRange.Font.Bold = False | |
oshp.TextFrame.TextRange.Font.Size = 10 | |
End If | |
End If | |
Next oshp | |
Next osld | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment