![]() |
#1
|
||||
|
||||
![]() Why this code fails: Code:
Sub demo() 'works fine Application.ScreenUpdating = False Dim iShp As InlineShape For Each iShp In ActiveDocument.InlineShapes With iShp.Range If iShp.Height > 6 Then iShp.LockAspectRatio = True iShp.Height = InchesToPoints(6) If .Hyperlinks.Count = 1 Then .Hyperlinks(1).Delete End If End If If iShp.Width > 4 Then iShp.LockAspectRatio = True iShp.Width = InchesToPoints(4) If .Hyperlinks.Count = 1 Then .Hyperlinks(1).Delete End If End If End With Next Application.ScreenUpdating = False End Sub 1) if the hight of the shape is > 6, make it to 6. 2) if the width of the shape is > 4, make it to 4. In above code irrespective of size of the shape it executes the code. |
Tags |
word vba |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Gary91 | Word | 3 | 01-21-2015 05:52 AM |
vlookup not working | jolinchew | Excel | 3 | 08-10-2013 05:24 PM |
![]() |
rkirkland | Project | 1 | 12-19-2012 02:47 PM |
![]() |
excelledsoftware | PowerPoint | 3 | 02-22-2012 12:41 PM |
GIF's stop working | Kwarior | PowerPoint | 3 | 03-17-2010 09:59 PM |