View Single Post
 
Old 10-10-2020, 10:25 AM
pushpi004 pushpi004 is offline Windows 10 Office 2016
Novice
 
Join Date: Feb 2020
Posts: 21
pushpi004 is on a distinguished road
Default Case sensitivity not followed when using replace method.

Hi all..
I hope all are doing well..
I have been trying to develop a small macro which could find certain words from a PowerPoint presentation and replace them with certain other words using the method TextRange.Replace(FindWhat:=FindString, _
Replacewhat:=ReplaceString, WholeWords:=True, MatchCase := False)

The requirement is that the ReplaceString should have the same case sensitivity as that of the words to be replaced in the presentation. But using the above method, the case of the ReplaceString always remains the same( as defined earlier). I need it to change it as per the case of the FindString from the presentation.

For example, if my FindString is bridge and ReplaceString is brg, in my presentation, if Bridge comes up, it should be replaced with Brg ( but with above method, it is replacing Bridge with brg)


I hope my query has made some sense..

Can anyone please help me with this?

Thanks
Regards

Last edited by pushpi004; 10-10-2020 at 10:35 AM. Reason: Providing example for better understanding
Reply With Quote