Necesito cambiar el tamaño (aumentar el tamaño) de las múltiples capturas de pantalla en un documento de Word con un solo clic.
Tengo una macro conmigo. El siguiente es el...
Sub ResizePics()
Dim shp As Word.Shape
Dim ishp As Word.InlineShape
If Word.Selection.Type <> wdSelectionInlineShape And _
Word.Selection.Type <> wdSelectionShape Then
Exit Sub
End If
If Word.Selection.Type = wdSelectionInlineShape Then
Set ishp = Word.Selection.Range.InlineShapes(1)
ishp.LockAspectRatio = False
ishp.Height = InchesToPoints(1.78)
ishp.Width = InchesToPoints(3.17)
Else
If Word.Selection.Type = wdSelectionShape Then
Set shp = Word.Selection.ShapeRange(1)
shp.LockAspectRatio = False
shp.Height = InchesToPoints(1.78)
shp.Width = InchesToPoints(3.17)
End If
End If
End Sub
pero la macro anterior funciona solo para una captura de pantalla. Si desea cambiar el tamaño de todas las imágenes seleccionadas, necesita alguna modificación.
Por favor ayúdenme a modificar la macro.
Respuesta1
Eché un vistazo a estotutorialy escribí ese código:
Sub ResizePics()
Dim shp As Word.Shape
Dim ishp As Word.InlineShape
For Each ishp In ActiveDocument.InlineShapes
ishp.LockAspectRatio = False
ishp.Height = InchesToPoints(1.78)
ishp.Width = InchesToPoints(3.17)
Next ishp
For Each shp In ActiveDocument.Shapes
shp.LockAspectRatio = False
shp.Height = InchesToPoints(1.78)
shp.Width = InchesToPoints(3.17)
Next shp
End Sub
No soy programador, así que esto es sólo un intento :)