If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
VBA - Find and Replace a character
(PPT 2003 and sometimes 2007)
Hi, again. Within every object on each of my slides, I want to replace Chr$(8482) for Chr$(9674). I also want it then superscripted, and for it to change characters in charts and wordart as well. But I'm stuck. Everything I'm trying is just turning into a mess. Can anyone help with this? Thanks a lot, Melina |
#2
|
|||
|
|||
VBA - Find and Replace a character
Hello,
Take a look at this example and then adapt it to your needs. http://skp.mvps.org/ppt00025.htm#2 Regards, Shyam Pillai Image Importer Wizard: http://skp.mvps.org/iiw.htm "Mel" wrote in message ... (PPT 2003 and sometimes 2007) Hi, again. Within every object on each of my slides, I want to replace Chr$(8482) for Chr$(9674). I also want it then superscripted, and for it to change characters in charts and wordart as well. But I'm stuck. Everything I'm trying is just turning into a mess. Can anyone help with this? Thanks a lot, Melina |
#3
|
|||
|
|||
VBA - Find and Replace a character
Thanks. But I can't figure out how can I make this search and replace
a character number such as replace Chr$(8482) with Chr$(9674). Can this be done? Thanks, Melina On Nov 19, 5:46*pm, "Shyam Pillai" wrote: Hello, Take a look at this example and then adapt it to your needs.http://skp.mvps.org/ppt00025.htm#2 Regards, Shyam Pillai Image Importer Wizard:http://skp.mvps.org/iiw.htm "Mel" wrote in message ... (PPT 2003 and sometimes 2007) Hi, again. Within every object on each of my slides, I want to replace Chr$(8482) for Chr$(9674). I also want it then superscripted, and for it to change characters in charts and wordart as well. But I'm stuck. Everything I'm trying is just turning into a mess. Can anyone help with this? Thanks a lot, Melina |
#4
|
|||
|
|||
VBA - Find and Replace a character
Can PPT not negotiate such high character numbers? My code works fine
with smaller character numbers. I'm just trying to replace the trade mark symbol with the lozenge symbol. The numbers I'm using is what PPT showed in recording a macro of inserting the symbols, so it'd appear PPT recognizes the character numbers. What am I doing wrong? Do I need to do something special with such high character numbers? This is what I'm using... Sub ReplaceChrs() Dim oSld As Slide Dim oShp As Shape Dim oTxtRng As TextRange Dim oTmpRng As TextRange Dim SearchFor As String Dim ReplaceWith As String SearchFor = Chr(8482) ReplaceWith = Chr(9674) For Each oSld In ActivePresentation.Slides For Each oShp In oSld.Shapes If oShp.HasTextFrame Then If oShp.TextFrame.HasText Then Set oTxtRng = oShp.TextFrame.TextRange Set oTmpRng = oTxtRng.Replace(FindWhat:=SearchFor, _ Replacewhat:=ReplaceWith, WholeWords:=False) Do While Not oTmpRng Is Nothing Set oTxtRng = oTxtRng.Characters(oTmpRng.Start + oTmpRng.Length, _ oTxtRng.Length) Set oTmpRng = oTxtRng.Replace(FindWhat:=SearchFor, _ Replacewhat:=ReplaceWith, WholeWords:=False) Loop End If End If Next oShp Next oSld End Sub On Nov 20, 9:31*am, Mel wrote: Thanks. But I can't figure out how can I make this search and replace a character number such as replace Chr$(8482) with Chr$(9674). Can this be done? Thanks, Melina On Nov 19, 5:46*pm, "Shyam Pillai" wrote: Hello, Take a look at this example and then adapt it to your needs.http://skp.mvps.org/ppt00025.htm#2 Regards, Shyam Pillai Image Importer Wizard:http://skp.mvps.org/iiw.htm "Mel" wrote in message .... (PPT 2003 and sometimes 2007) Hi, again. Within every object on each of my slides, I want to replace Chr$(8482) for Chr$(9674). I also want it then superscripted, and for it to change characters in charts and wordart as well. But I'm stuck. Everything I'm trying is just turning into a mess. Can anyone help with this? Thanks a lot, Melina |
Thread Tools | |
Display Modes | |
|
|