Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-29-2015, 06:51 AM
mart84 mart84 is offline Find/Replace letters with color change Mac OS X Find/Replace letters with color change Office 2008 for Mac
Novice
Find/Replace letters with color change
 
Join Date: Mar 2015
Posts: 4
mart84 is on a distinguished road
Default Find/Replace letters with color change

Hello, I am new here - since I have not found a solution for my problem after a long search, I hope that somebody can help me here.

I have a (longish) power point presentation and would like to color specific letters differently from the others. (e.g. word => word)). I do not want to use the normal find and replace tool and manually change the color for every single letter but am looking for something like the special find and replace options word provides for (where it is possible to e.g. change to bold and/or italic and/or different color).

Do you have any idea how this can be done?

As an additional information: i use mac but also have a pc that i can use. also, if I have to buy an newer version of power point to solve the problem, this is not an issue.

Thank you a lot in advance!


M
Reply With Quote
  #2  
Old 03-29-2015, 07:51 AM
JohnWilson JohnWilson is offline Find/Replace letters with color change Windows 7 64bit Find/Replace letters with color change Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

PPT doesn't have the special find option that you can use in word. You might be able to use code but you would need to describe EXACTLY what you want to happen.
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #3  
Old 03-29-2015, 07:58 AM
mart84 mart84 is offline Find/Replace letters with color change Mac OS X Find/Replace letters with color change Office 2008 for Mac
Novice
Find/Replace letters with color change
 
Join Date: Mar 2015
Posts: 4
mart84 is on a distinguished road
Default

thanks a lot for the reply and the hint to the code. As to the code: I have a text and I want to change the color of all lower case consonants within the text (whereas the color of the remaining letters shall remain as it is). More specifically, I want to change the color of the letters from white to black (it is a ppt with black background). The idea is to get a text with missing letters that have to be completed by the readers (but can be shown if needed). Does that help or would you need more specific information?

best
Reply With Quote
  #4  
Old 03-29-2015, 09:03 AM
JohnWilson JohnWilson is offline Find/Replace letters with color change Windows 7 64bit Find/Replace letters with color change Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

This is off the top of my head and I don't have a Mac. (Don't think 2008 supports vba code) Use on a copy anyway.

Also it will NOT search tables, smart art etc just simple text in placeholders or textboxes.

Code:
Sub findLCConsonants()
Dim osld As Slide
Dim oshp As Shape
Dim L As Long
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
If oshp.HasTextFrame Then
If oshp.TextFrame.HasText Then
For L = 1 To oshp.TextFrame.TextRange.Length
Select Case Asc(oshp.TextFrame.TextRange.Characters(L))
'less than 97 or > 122 are not lowercase
'65,101,105,111,117 are vowels
Case Is < 97, 65, 101, 105, 111, 117, Is > 122
'do nothing
Case Else
oshp.TextFrame.TextRange.Characters(L).Font.Color.RGB = RGB(0, 0, 0)
End Select
Next L
End If
End If
Next oshp
Next osld
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #5  
Old 04-05-2015, 11:00 AM
mart84 mart84 is offline Find/Replace letters with color change Mac OS X Find/Replace letters with color change Office 2008 for Mac
Novice
Find/Replace letters with color change
 
Join Date: Mar 2015
Posts: 4
mart84 is on a distinguished road
Default

You're great, thanks! it works perfectly well!!

i have now tried to inverse the code (i.e. vowels shall be black instead of consonants) but am miserably failing... can you maybe also help me with this?

Thans a lot!!
Reply With Quote
  #6  
Old 04-05-2015, 01:13 PM
JohnWilson JohnWilson is offline Find/Replace letters with color change Windows 7 64bit Find/Replace letters with color change Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

That would actually be easier! If you also want UPPER CASE vowels you would need to add the upper case codes 65 ,69,73,79,85

Code:
Sub findLCVowels()
Dim osld As Slide
Dim oshp As Shape
Dim L As Long
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
If oshp.HasTextFrame Then
If oshp.TextFrame.HasText Then
For L = 1 To oshp.TextFrame.TextRange.Length
Select Case Asc(oshp.TextFrame.TextRange.Characters(L))
'97,101,105,111,117 are vowels
Case Is = 97, 101, 105, 111, 117 ' lower case vowels
oshp.TextFrame.TextRange.Characters(L).Font.Color.RGB = RGB(0, 0, 0)
Case Else
'do nothing
End Select
Next L
End If
End If
Next oshp
Next osld
End Sub
Note there was an error in the first code 65 should be 97
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #7  
Old 04-06-2015, 09:18 AM
mart84 mart84 is offline Find/Replace letters with color change Mac OS X Find/Replace letters with color change Office 2008 for Mac
Novice
Find/Replace letters with color change
 
Join Date: Mar 2015
Posts: 4
mart84 is on a distinguished road
Default

Dear JohnWilson

Thank you so much - the code works and has saved me (or my boyfriend respectively) a great deal of time!

I wish you a good end of the easter weekend!!

Best, M
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use find and replace to change text to a custom style wrdy Word 7 03-11-2014 12:09 AM
Find instance of a word in a specific style and change its color hwg Word VBA 7 02-20-2014 10:59 PM
how to search and replace BOLD text >> font color change? dylansmith Word 4 03-12-2013 09:51 PM
Find/Replace letters with color change remove color from find/replace? Cobb78 Word 1 05-26-2012 06:16 PM
Find/Replace letters with color change Find and Replace - Variable change Ssendam Excel 1 07-16-2009 11:44 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:31 AM.


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