How do you get rid of an empty line at the end of a slide?
-
- 4StarLounger
- Posts: 437
- Joined: 05 Nov 2012, 20:02
How do you get rid of an empty line at the end of a slide?
How do you automatically get rid of an empty line at the end of a slide?
-
- Administrator
- Posts: 78231
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: How do you get rid of an empty line at the end of a slid
What happens if you click in that line and press Backspace?
Or if you click at the end of the line above it and press Delete?
Or if you click at the end of the line above it and press Delete?
Best wishes,
Hans
Hans
-
- 4StarLounger
- Posts: 437
- Joined: 05 Nov 2012, 20:02
Re: How do you get rid of an empty line at the end of a slid
Is there an "automatic" way of removing all end-of-slide empty lines? That was actually the gist of my OP, although I couldn't put in the word "automatically" in the title due to space limit.HansV wrote:What happens if you click in that line and press Backspace?
Or if you click at the end of the line above it and press Delete?
-
- Administrator
- Posts: 78231
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: How do you get rid of an empty line at the end of a slid
You could run the following macro:
Unfortunately, PowerPoint doesn't have a global macro container such as Normal.dotm for Word or Personal.xlsb for Excel. The only way to make a macro available in all presentations is by creating and loading a PowerPoint add-in (.ppam) that adds a button to the ribbon (or to a custom toolbar). See for example How to Add a Ribbon Entry That Runs a Macro in 2007 and/or Create an ADD-IN with TOOLBARS that run macros.
Code: Select all
Sub RemoveEmpties()
Dim sld As Slide
Dim shp As Shape
Dim tfm As TextFrame
Dim trg As TextRange
For Each sld In ActivePresentation.Slides
For Each shp In sld.Shapes
If shp.HasTextFrame Then
Set tfm = shp.TextFrame
Set trg = tfm.TextRange
Do While Right(trg.Text, 1) = vbCr
trg.Text = Left(trg.Text, Len(trg.Text) - 1)
Loop
End If
Next shp
Next sld
End Sub
Best wishes,
Hans
Hans
-
- 4StarLounger
- Posts: 437
- Joined: 05 Nov 2012, 20:02
Re: How do you get rid of an empty line at the end of a slid
Thanks! This will be a bigger project than I hoped.HansV wrote: Unfortunately, PowerPoint doesn't have a global macro container such as Normal.dotm for Word or Personal.xlsb for Excel. The only way to make a macro available in all presentations is by creating and loading a PowerPoint add-in (.ppam) that adds a button to the ribbon (or to a custom toolbar). See for example How to Add a Ribbon Entry That Runs a Macro in 2007 and/or Create an ADD-IN with TOOLBARS that run macros.