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
Regards,
Shyam Pillai
Image Importer Wizard: http://skp.mvps.org/iiw.htm
"Mel" <mel....@yahoo.com> wrote in message
news:fc01e139-9cd1-4990...@s31g2000yqs.googlegroups.com...
Thanks,
Melina
On Nov 19, 5:46 pm, "Shyam Pillai" <ShyamPil...@Gmail.com> 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" <mel.tu...@yahoo.com> wrote in message
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
Chr$(8482) gives me an error message.
Try ChrW$() instead of Chr$()
>
> Thanks,
> Melina
>
> On Nov 19, 5:46 pm, "Shyam Pillai" <ShyamPil...@Gmail.com> wrote:
> > Hello,
> > Take a look at this example and then adapt it to your needs.http://skp.mv
> ps.org/ppt00025.htm#2
> >
> > Regards,
> > Shyam Pillai
> >
> > Image Importer Wizard:http://skp.mvps.org/iiw.htm
> >
> > "Mel" <mel.tu...@yahoo.com> wrote in message
> >
> > news:fc01e139-9cd1-4990...@s31g2000yqs.googlegroups.com...
> >
> > > (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
==============================
PPT Frequently Asked Questions
http://www.pptfaq.com/
PPTools add-ins for PowerPoint
http://www.pptools.com/
Ok, so can you enlighten me as to what's the difference between the
two (besides one worked and the other didn't.)
Thanks so much, Steve!!!
-Melina
On Nov 20, 2:22 pm, Steve Rindsberg <ab...@localhost.com> wrote:
> In article <2c0eb7c9-606a-471f-b9b3-
WooHOO! Intuition strikes the right place once in a while.
>
> Ok, so can you enlighten me as to what's the difference between the
> two (besides one worked and the other didn't.)
The Chr$() function is supposed to be able to accept a Long as an argument, but
it only returns a single-byte character, so anything over 255 is a) meaningless
and b) will throw an error.
ChrW$() returns a "wide" (unicode/multi-byte) character, which is what you're
after. Note that you can still run into weirdness if you ask for values > 255 in
text formatted in a single-byte font.
>
> Thanks so much, Steve!!!
>
> -Melina
>
> On Nov 20, 2:22 pm, Steve Rindsberg <ab...@localhost.com> wrote:
> > In article <2c0eb7c9-606a-471f-b9b3-
> >
> > 827cdc6e1...@k4g2000yqb.googlegroups.com>, 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?
> >
> > Chr$(8482) gives me an error message.
> >
> > Try ChrW$() instead of Chr$()
> >
> >
> >
> >
> >
> > > Thanks,
> > > Melina
> >
> > > On Nov 19, 5:46 pm, "Shyam Pillai" <ShyamPil...@Gmail.com> wrote:
> > > > Hello,
> > > > Take a look at this example and then adapt it to your needs.http://sk
> p.mv
> > > ps.org/ppt00025.htm#2
> >
> > > > Regards,
> > > > Shyam Pillai
> >
> > > > Image Importer Wizard:http://skp.mvps.org/iiw.htm
> >
> > > > "Mel" <mel.tu...@yahoo.com> wrote in message
> >
> > > >news:fc01e139-9cd1-4990...@s31g2000yqs.googlegroups.com....
> >
> > > > > (PPT 2003 and sometimes 2007)
> >
> > > > > Hi, again.
> >
> > > > > Within every object on each of my slides, I want to replace Chr$(84
> 82)
> > > > > 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
> >
> > ========================
> ======
> > PPT Frequently Asked Questionshttp://www.pptfaq.com/
> >
> > PPTools add-ins for PowerPointhttp://www.pptools.com/