Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-05-2018, 02:18 AM
FlashPoint FlashPoint is offline How remove a repeated text box from all slides in PowerPoint Windows 10 How remove a repeated text box from all slides in PowerPoint Office 2016
Novice
How remove a repeated text box from all slides in PowerPoint
 
Join Date: Jan 2018
Posts: 6
FlashPoint is on a distinguished road
Default How remove a repeated text box from all slides in PowerPoint

Hello there



I have a PowerPoint document that it’s modifier (he’s not even it’s author) used a textbox in all of the slides & put his email address there!
Slides are a lot & I can’t simple remove them one by one it’s a waste of time.
Can anyone plz help me how can I remove them all at once? I saw someone did it to a repeated picture using “Macros” but I’m not expert how to do.
Your help would be appreciated, thx.
Reply With Quote
  #2  
Old 01-05-2018, 05:04 AM
JohnWilson JohnWilson is offline How remove a repeated text box from all slides in PowerPoint Windows 7 64bit How remove a repeated text box from all slides in PowerPoint Office 2016
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

Code:
Sub zapper()

Dim osld As Slide
Dim L As Long
For Each osld In ActivePresentation.Slides
For L = osld.Shapes.Count To 1 Step -1
If osld.Shapes(L).HasTextFrame Then
If osld.Shapes(L).TextFrame.HasText Then
' obviously use their address
If LCase(osld.Shapes(L).TextFrame.TextRange) Like Lcase( "*john@somewhere.com*" )Then osld.Shapes(L).Delete
End If
End If
Next
Next
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #3  
Old 01-05-2018, 07:03 AM
FlashPoint FlashPoint is offline How remove a repeated text box from all slides in PowerPoint Windows 10 How remove a repeated text box from all slides in PowerPoint Office 2016
Novice
How remove a repeated text box from all slides in PowerPoint
 
Join Date: Jan 2018
Posts: 6
FlashPoint is on a distinguished road
Default

Quote:
Originally Posted by JohnWilson View Post
Code:
Sub zapper()

Dim osld As Slide
Dim L As Long
For Each osld In ActivePresentation.Slides
For L = osld.Shapes.Count To 1 Step -1
If osld.Shapes(L).HasTextFrame Then
If osld.Shapes(L).TextFrame.HasText Then
' obviously use their address
If LCase(osld.Shapes(L).TextFrame.TextRange) Like Lcase( "*john@somewhere.com*" )Then osld.Shapes(L).Delete
End If
End If
Next
Next
End Sub
Thanks for help but can u explain a little more how can I use it?
Reply With Quote
  #4  
Old 01-07-2018, 02:51 AM
JohnWilson JohnWilson is offline How remove a repeated text box from all slides in PowerPoint Windows 7 64bit How remove a repeated text box from all slides in PowerPoint Office 2016
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

Google for how to use vba
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #5  
Old 01-07-2018, 12:41 PM
FlashPoint FlashPoint is offline How remove a repeated text box from all slides in PowerPoint Windows 10 How remove a repeated text box from all slides in PowerPoint Office 2016
Novice
How remove a repeated text box from all slides in PowerPoint
 
Join Date: Jan 2018
Posts: 6
FlashPoint is on a distinguished road
Default

Quote:
Originally Posted by JohnWilson View Post
Google for how to use vba
Thanks I learned to how use Macros & used your code, but this code only removed his Email address from first slide not all that hundreds slides.
Can u check it again plz? Thx
Reply With Quote
  #6  
Old 01-07-2018, 01:05 PM
JohnWilson JohnWilson is offline How remove a repeated text box from all slides in PowerPoint Windows 7 64bit How remove a repeated text box from all slides in PowerPoint Office 2016
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

It should remove them all.
Are you sure you got the code correct (eg NOT taking out the asterisks's when you modified the email the email?)
Can you post the presentation somewhere? (maybe just a few of the slides)
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #7  
Old 01-07-2018, 01:28 PM
FlashPoint FlashPoint is offline How remove a repeated text box from all slides in PowerPoint Windows 10 How remove a repeated text box from all slides in PowerPoint Office 2016
Novice
How remove a repeated text box from all slides in PowerPoint
 
Join Date: Jan 2018
Posts: 6
FlashPoint is on a distinguished road
Default

Quote:
Originally Posted by JohnWilson View Post
It should remove them all.
Are you sure you got the code correct (eg NOT taking out the asterisks's when you modified the email the email?)
Can you post the presentation somewhere? (maybe just a few of the slides)
File is big but plz first check my code to make sure that I didn't modify it in wrong way:

Sub Hello()
Dim osld As Slide
Dim L As Long
For Each osld In ActivePresentation.Slides
For L = osld.Shapes.Count To 1 Step -1
If osld.Shapes(L).HasTextFrame Then
If osld.Shapes(L).TextFrame.HasText Then
' obviously use their address
If LCase(osld.Shapes(L).TextFrame.TextRange) Like LCase("*email@aa.com*") Then osld.Shapes(L).Delete
End If
End If
Next
Next
End Sub

Last edited by FlashPoint; 01-08-2018 at 08:45 AM.
Reply With Quote
  #8  
Old 01-07-2018, 01:56 PM
JohnWilson JohnWilson is offline How remove a repeated text box from all slides in PowerPoint Windows 7 64bit How remove a repeated text box from all slides in PowerPoint Office 2016
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

Looks OK.

Are you sure you can manually delete the textboxes?

They may have added textboxes to the master or layouts which the code will not delete

And just in case you are trying to pass of someones work as your own I will be able to tell so don't go there if that is what you are doing. Apologies if this is legit!
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #9  
Old 01-07-2018, 02:17 PM
FlashPoint FlashPoint is offline How remove a repeated text box from all slides in PowerPoint Windows 10 How remove a repeated text box from all slides in PowerPoint Office 2016
Novice
How remove a repeated text box from all slides in PowerPoint
 
Join Date: Jan 2018
Posts: 6
FlashPoint is on a distinguished road
Default

Quote:
Originally Posted by JohnWilson View Post
Looks OK.

Are you sure you can manually delete the textboxes?

They may have added textboxes to the master or layouts which the code will not delete

And just in case you are trying to pass of someones work as your own I will be able to tell so don't go there if that is what you are doing. Apologies if this is legit!
No it's not illegal, it's some slides of a medical course from a very bad teacher, actually he spamed whole file with his email, slides and images belongs to famous professor Guyton.
I want to read it for his great work on medical science not those spams!

anyway, I uploaded file here with several slides, can u plz check and help me in? thx

http://www.mediafire.com/file/7qgd23...gyton%2092.ppt
Reply With Quote
  #10  
Old 01-08-2018, 01:40 AM
JohnWilson JohnWilson is offline How remove a repeated text box from all slides in PowerPoint Windows 7 64bit How remove a repeated text box from all slides in PowerPoint Office 2016
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

Looks like you have the email wrong. It is remove

Make sure the email in the code matches that on the slides.

Since it's a fairly unusual email you could also use:

If LCase(osld.Shapes(L).TextFrame.TextRange) Like LCase("*remove*") Then osld.Shapes(L).Delete
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials

Last edited by JohnWilson; 01-08-2018 at 09:03 AM.
Reply With Quote
  #11  
Old 01-08-2018, 08:44 AM
FlashPoint FlashPoint is offline How remove a repeated text box from all slides in PowerPoint Windows 10 How remove a repeated text box from all slides in PowerPoint Office 2016
Novice
How remove a repeated text box from all slides in PowerPoint
 
Join Date: Jan 2018
Posts: 6
FlashPoint is on a distinguished road
Talking

Quote:
Originally Posted by JohnWilson View Post
Looks like you have the email wrong. It is pourshanazari@med.mui.ac.ir

Make sure the email in the code matches that on the slides.

Since it's a fairly unusual email you could also use:

If LCase(osld.Shapes(L).TextFrame.TextRange) Like LCase("*remove*") Then osld.Shapes(L).Delete
Ahhh yes he used adifferent email at first slide so I though other slides are same too!
now I used your first code with main spam Email and they all removed!

thank u so much you are genius in coding!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Powerpoint 2016 slide show presenter view as powerpoint 2010 multiple slides at the bottom jomo252 PowerPoint 0 10-04-2017 12:20 PM
Add text during powerpoint show duplicated to all slides techsupport1 PowerPoint 0 09-07-2016 02:33 PM
How remove a repeated text box from all slides in PowerPoint Remove title from APA citation repeated first author pablrodr Word 4 09-11-2015 01:00 AM
Generating text output from PowerPoint picture/name slides bornslippy PowerPoint 2 12-05-2013 11:04 AM
Powerpoint 2003 - slides with Excel text franklyorange PowerPoint 0 08-19-2008 09:30 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:52 PM.


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