Problema con funzione FindReplace vba excel macro

di Anonimizzato26413 il
1 risposte
Il debug mi dà errore alla terza riga.. Non capisco cosa sbaglio anche perché sono nuovo in questo linguaggio.
Devo cercare in un file PowerPoint la parola "tests" e cambiarla in "test".


  
Sub FindReplace()
Dim sld As Slide
Set sld = ActivePresentation.Slides(1)
Dim shp As Shape
For Each shp In sld.Shapes
If shp.HasTextFrame Then
    If shp.TextFrame.HasText Then
        shp.TextFrame.TextRange.Text = Replace(shp.TextFrame.TextRange.Text, "tests", "test")
    End If
End If
Next shp
End Sub

1 Risposte

  • Se sei su excel (e non è chiaro) la riga
    Set sld = ActivePresentation.Slides(1)
    non ha alcun senso
Devi accedere o registrarti per scrivere nel forum
1 risposte