![]() |
|
#1
|
|||
|
|||
|
Hello everyone!
I have multiple linked pictures and objects (including Excel worksheet objects) and I need to reset all their sizes to 100% after they are updated since they seem to break. I tried the following macros but none worked: 1: Code:
Sub Resize()
Dim i As Long
With ActiveDocument
For i = 1 To .InlineShapes.Count
With .InlineShapes(i)
.ScaleHeight = 100
.ScaleWidth = 100
End With
Next i
End With
End Sub
Code:
Sub Resize()
Dim Slide As InlineShape
For Each Slide In ActiveDocument.InlineShapes
With Slide
If .Type = wdInlineShapeEmbeddedOLEObject Then
.ScaleWidth = 100
.ScaleHeight = 100
End If
End With
Next
End Sub
Code:
Sub Resize()
Dim PecentSize As Integer
PercentSize = 100
If Selection.InlineShapes.Count > 0 Then
Selection.InlineShapes(1).ScaleHeight = PercentSize
Selection.InlineShapes(1).ScaleWidth = PercentSize
Else
Selection.ShapeRange.ScaleHeight Factor:=(PercentSize / 100), _
RelativeToOriginalSize:=msoCTrue
Selection.ShapeRange.ScaleWidth Factor:=(PercentSize / 100), _
RelativeToOriginalSize:=msoCTrue
End If
End Sub
|
| Tags |
| macro, resize objects, resize pictures |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Shift key not working to resize objects | liambobrien | PowerPoint | 2 | 12-16-2015 11:03 AM |
Resize multiple PowerPoint objects in a table at the same time
|
Duradel | Word Tables | 3 | 11-16-2014 04:01 PM |
Resize multiple pictures in a Word 2010 table
|
JBA479 | Word VBA | 1 | 01-24-2014 08:51 PM |
| Resize and distribute width - 2 pictures | AndyDDUK | PowerPoint | 2 | 10-10-2012 03:38 AM |
| Resize Email pictures in Outlook - Office 2007? | jonesnewton | Outlook | 0 | 05-16-2010 04:11 AM |