Dear All
I have to search slides in presentation "400.pptx" which contains a word , lets say "pumping". I have developed user form in power point "Sel_ppt..pptm". IN the user form, user can enter any word and the macro is searching slides in 400.ppt. If there is any slide containining "pumping" then it copies that slide into "sel_pptx".
Issue is if the user key in "pumping" instead of "Pumping" then the macro is not able to select slide even if contains "Pumping".
How to ensure that the search should check for "pumping" regardess of case used?
Here is the code:
VWcard is a text field in userform2
VWCard = "*" & UserForm2.WCard.Value & "*" 'Text field in userform in which user can key in search word
Here the word given in VWCard is being searched in different shapes in every slide of the power point "400.pptx"
If (PowerPoint.Application.Presentations("400.pptx").Slides(NRow).Shapes(1).TextFrame.TextRange.Text Like "" & VWCard & "") Or (PowerPoint.Application.Presentations("400.pptx").Slides(NRow).Shapes(2).TextFrame.TextRange.Text Like "" & VWCard & "") Or (PowerPoint.Application.Presentations("400.pptx").Slides(NRow).Shapes(3).TextFrame.TextRange.Text Like "" & VWCard & "") Or (PowerPoint.Application.Presentations("400.pptx").Slides(NRow).Shapes(11).TextFrame.TextRange.Text Like "" & VWCard & "") Or _
(PowerPoint.Application.Presentations("400.pptx").Slides(NRow).Shapes(4).TextFrame.TextRange.Text Like "" & VWCard & "") Or (PowerPoint.Application.Presentations("400.pptx").Slides(NRow).Shapes(8).TextFrame.TextRange.Text Like "" & VWCard & "") Or (PowerPoint.Application.Presentations("400.pptx").Slides(NRow).Shapes(12).TextFrame.TextRange.Text Like "" & VWCard & "") Or (PowerPoint.Application.Presentations("400.pptx").Slides(NRow).Shapes(15).TextFrame.TextRange.Text Like "" & VWCard & "") Then
PowerPoint.Application.Presentations("C:\OEM\SST\400.pptx").Slides(NRow).Copy
'pres2.Slides.Paste pres2.Slides.Count + 1
With pres1.Slides.Paste
.ColorScheme = PowerPoint.Application.Presentations("C:\OEM\SST\400.pptx").Slides(NRow).ColorScheme
End With
I have to search slides in presentation "400.pptx" which contains a word , lets say "pumping". I have developed user form in power point "Sel_ppt..pptm". IN the user form, user can enter any word and the macro is searching slides in 400.ppt. If there is any slide containining "pumping" then it copies that slide into "sel_pptx".
Issue is if the user key in "pumping" instead of "Pumping" then the macro is not able to select slide even if contains "Pumping".
How to ensure that the search should check for "pumping" regardess of case used?
Here is the code:
VWcard is a text field in userform2
VWCard = "*" & UserForm2.WCard.Value & "*" 'Text field in userform in which user can key in search word
Here the word given in VWCard is being searched in different shapes in every slide of the power point "400.pptx"
If (PowerPoint.Application.Presentations("400.pptx").Slides(NRow).Shapes(1).TextFrame.TextRange.Text Like "" & VWCard & "") Or (PowerPoint.Application.Presentations("400.pptx").Slides(NRow).Shapes(2).TextFrame.TextRange.Text Like "" & VWCard & "") Or (PowerPoint.Application.Presentations("400.pptx").Slides(NRow).Shapes(3).TextFrame.TextRange.Text Like "" & VWCard & "") Or (PowerPoint.Application.Presentations("400.pptx").Slides(NRow).Shapes(11).TextFrame.TextRange.Text Like "" & VWCard & "") Or _
(PowerPoint.Application.Presentations("400.pptx").Slides(NRow).Shapes(4).TextFrame.TextRange.Text Like "" & VWCard & "") Or (PowerPoint.Application.Presentations("400.pptx").Slides(NRow).Shapes(8).TextFrame.TextRange.Text Like "" & VWCard & "") Or (PowerPoint.Application.Presentations("400.pptx").Slides(NRow).Shapes(12).TextFrame.TextRange.Text Like "" & VWCard & "") Or (PowerPoint.Application.Presentations("400.pptx").Slides(NRow).Shapes(15).TextFrame.TextRange.Text Like "" & VWCard & "") Then
PowerPoint.Application.Presentations("C:\OEM\SST\400.pptx").Slides(NRow).Copy
'pres2.Slides.Paste pres2.Slides.Count + 1
With pres1.Slides.Paste
.ColorScheme = PowerPoint.Application.Presentations("C:\OEM\SST\400.pptx").Slides(NRow).ColorScheme
End With