Has TextRange.Replace method been changed (on purpose) in PPT 2007

G

Guest

This problem smacks of the one reported by Christopher King on 3/24 ... dunno.

I don't believe that TextRange.Replace is working the same in 2007 as it did
in 2003. Perhaps someone else could test this case? If they get the same
(surprising and disconcerting) results that I do, then we would need to find
out if the official definition of the TextRange.Replace method has changed,
or whether perhaps a fix from MS is forthcoming. To test, do this:

1. Insert a text box on a slide containing "abc xyz abc"
2. Select the second "abc"
3. Now run this sub:

sub TestTextRangeReplace
ActiveWindow.Selection.TextRange.Replace findwhat:="abc",
replacewhat:="def"
end sub

When I run this on a .ppt file using PowerPoint 2007, only the first "abc"
is changed to "def", not the second (selected) one. This would seem to make
it very difficult in some instances to change certain text while leaving
other text alone.

I'm having a very difficult time believing that Replace is working as it
should. It certainly doesn't seem to be working as it did in 2003. Can
someone shed some light on this?
 
S

Steve Rindsberg

Dave Jenkins said:
This problem smacks of the one reported by Christopher King on 3/24 ... dunno.

I don't believe that TextRange.Replace is working the same in 2007 as it did
in 2003. Perhaps someone else could test this case?

You're right. It works as you'd expect it to in 2003 and it's wonko in 2007.
I'll pass this up the line. Thanks for the clear repro instrux, Dave.


If they get the same
 
G

Guest

Steve Rindsberg said:
You're right. It works as you'd expect it to in 2003 and it's wonko in 2007.
I'll pass this up the line. Thanks for the clear repro instrux, Dave.


Thanks for validating this, Steve.

Hope they don't generate a fix and just slip it in some night - it would be
nice to know when to take my workaround code out - it's based on
Applicaiton.Version right now. Hmmm ... I guess I could do a test with an
inserted textbox where I *know* what the answers should be, and predicate my
code accordingly. That way, even if they slip in a fix, things should still
run. I'll have to mull on that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top