Finding wild charecters in VBA ?

Premanshu

Board Regular
Joined
Oct 2, 2007
Messages
91
Hi :)

first of all please let me inform the question i am asking is about power point VBA but am not sure about the right forum to ask the question. Kindly direct me to the right place if anyone knows where i can get my answer.

I am trying to build a macro in powerpoint application which would go through all the shapes of all the slides and find particular values and highlight them.

Now the value i would be searcing for is not of fixed length for example i am looking for a hyphen (-) which has 2 numbers both at the begining and at end (i.e 12-34, 79-30..etc)
as you can see the numbers could be anything but the format would be the same. Kindly advice how can i write a macro for this.

I have a macro in word VBA which could do the above thing easily, but i am just unable to figureout a way in powerpoint. (But i hope it should be possible in powerpoint as well)

below is the code example
[code\]

Sub trial()
Options.DefaultHighlightColorIndex = wdPink
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Highlight = True
With Selection.Find
.Text = "^#-^#"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchByte = False
.CorrectHangulEndings = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

End Sub

[\code]

Please help...

Regards,
Premanshu
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Forum statistics

Threads
1,225,170
Messages
6,183,323
Members
453,155
Latest member
joncaxddd

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top