Если нужно задать размер всем иллюстрациям в документе MS Word
Sub AllPictSize()
Dim PercentSize As Integer
Dim oIshp As InlineShape
Dim oshp As Shape
PercentSize = InputBox("Enter percent of full size", "Resize Picture", 100)
For Each oIshp In ActiveDocument.InlineShapes
With oIshp
.ScaleHeight = PercentSize
.ScaleWidth = PercentSize
End With
Next oIshp
For Each oshp In ActiveDocument.Shapes
With oshp
.ScaleHeight Factor:=(PercentSize / 100), _
RelativeToOriginalSize:=msoCTrue
.ScaleWidth Factor:=(PercentSize / 100), _
RelativeToOriginalSize:=msoCTrue
End With
Next oshp
End Sub
Как добавить макрос
В Word нажмите сочетание клавиш Alt + F11, вставьте код в редактор, нажмите Ctrl + S, затем Alt + F4.
Нажмите Alt + F8 и запустите макрос AllPictSize.
Sub AllPictSize()
Dim PercentSize As Integer
Dim oIshp As InlineShape
Dim oshp As Shape
PercentSize = InputBox("Enter percent of full size", "Resize Picture", 100)
For Each oIshp In ActiveDocument.InlineShapes
With oIshp
.ScaleHeight = PercentSize
.ScaleWidth = PercentSize
End With
Next oIshp
For Each oshp In ActiveDocument.Shapes
With oshp
.ScaleHeight Factor:=(PercentSize / 100), _
RelativeToOriginalSize:=msoCTrue
.ScaleWidth Factor:=(PercentSize / 100), _
RelativeToOriginalSize:=msoCTrue
End With
Next oshp
End Sub
Как добавить макрос
В Word нажмите сочетание клавиш Alt + F11, вставьте код в редактор, нажмите Ctrl + S, затем Alt + F4.
Нажмите Alt + F8 и запустите макрос AllPictSize.
Если нужно задать размер всем иллюстрациям в документе MS Word
Sub AllPictSize()
Dim PercentSize As Integer
Dim oIshp As InlineShape
Dim oshp As Shape
PercentSize = InputBox("Enter percent of full size", "Resize Picture", 100)
For Each oIshp In ActiveDocument.InlineShapes
With oIshp
.ScaleHeight = PercentSize
.ScaleWidth = PercentSize
End With
Next oIshp
For Each oshp In ActiveDocument.Shapes
With oshp
.ScaleHeight Factor:=(PercentSize / 100), _
RelativeToOriginalSize:=msoCTrue
.ScaleWidth Factor:=(PercentSize / 100), _
RelativeToOriginalSize:=msoCTrue
End With
Next oshp
End Sub
Как добавить макрос
В Word нажмите сочетание клавиш Alt + F11, вставьте код в редактор, нажмите Ctrl + S, затем Alt + F4.
Нажмите Alt + F8 и запустите макрос AllPictSize.
Sub AllPictSize()
Dim PercentSize As Integer
Dim oIshp As InlineShape
Dim oshp As Shape
PercentSize = InputBox("Enter percent of full size", "Resize Picture", 100)
For Each oIshp In ActiveDocument.InlineShapes
With oIshp
.ScaleHeight = PercentSize
.ScaleWidth = PercentSize
End With
Next oIshp
For Each oshp In ActiveDocument.Shapes
With oshp
.ScaleHeight Factor:=(PercentSize / 100), _
RelativeToOriginalSize:=msoCTrue
.ScaleWidth Factor:=(PercentSize / 100), _
RelativeToOriginalSize:=msoCTrue
End With
Next oshp
End Sub
Как добавить макрос
В Word нажмите сочетание клавиш Alt + F11, вставьте код в редактор, нажмите Ctrl + S, затем Alt + F4.
Нажмите Alt + F8 и запустите макрос AllPictSize.
У записи 1 лайков,
0 репостов.
0 репостов.
Эту запись оставил(а) на своей стене Николай Щербаков