Delete paragraph space between paragraph

gailb
StarLounger
Posts: 97
Joined: 09 May 2020, 14:00

Delete paragraph space between paragraph

Post by gailb »

I will be creating slide presentations of all books in the New Testament. As a test, in this file I created up thru chapter 7 to display the questions.

I know I can do this manually, but after 27 books and ~7800 verse this will get old quick. Is there a VBA solution that could help me out here?

Example: See slide #5, 15, 40, 46, and so on.
Matthew.pptm
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 69393
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Delete paragraph space between paragraph

Post by HansV »

What are you actually asking for?

(I don't see anything special about slides 5, 15, etc.)
Regards,
Hans

gailb
StarLounger
Posts: 97
Joined: 09 May 2020, 14:00

Re: Delete paragraph space between paragraph

Post by gailb »

Example, on slide 5, there is a gap between verse 17 and verse 18

On Slide 15, there is a gap between verse 10 and verse 11

On these two slides it doesn't make a big difference as the 4 verses do not overspill the slide, but It could happen. I have a macro in Excel that copies 4 verses at a time and pastes into the ppt presentation.

User avatar
HansV
Administrator
Posts: 69393
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Delete paragraph space between paragraph

Post by HansV »

Ah, of course. Try this:

Code: Select all

Sub RemoveTabs()
    Dim sld As Slide
    Dim shp As Shape
    For Each sld In ActivePresentation.Slides
        For Each shp In sld.Shapes
            If shp.HasTextFrame = True Then
                If shp.TextFrame.HasText = True Then
                    With shp.TextFrame.TextRange
                        .Text = Replace(.Text, vbTab, "")
                    End With
                End If
            End If
        Next shp
    Next sld
End Sub
Regards,
Hans

gailb
StarLounger
Posts: 97
Joined: 09 May 2020, 14:00

Re: Delete paragraph space between paragraph

Post by gailb »

That seems to do it great. Thanks Hans.