Microsoft Word/Run-time error '4693'


Hi Mr. Heritage,
I am receiving the following error for my Picture re-sizing macro. Below will be posted the macro. How can this be fixed?

Run-time error '4693':
This member cannot be accessed on a horizontal line.

The macro is as follows:
Private Sub PercentSize()
   ' Sometimes there are pictures throughout the document. These pictures
   ' are way too big for the page, so this Sub allows the user to resize
   ' the page via percentages. This Sub works for both pictures/OLEs and
   ' inline shapes.
   Dim PercentSize As Integer
   Dim oIshp As InlineShape
   Dim oshp As Shape
   PercentSize = InputBox("Enter percent of full size", "Resize Picture ", 75)
   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), _
         .ScaleWidth Factor:=(PercentSize / 100), _
       End With
   Next oshp
End Sub

Thank you!

The macro says it resizes both pictures and shapes, and your description of the indicator seems to say it's the hozizontal line that is causing the problem - as this doesn't need to be resized, I'd try putting
On Error Resume next
as the first true line of the macro, which should cause it to move over the offending shape and just carry on
About Microsoft Word
This topic answers questions related to Microsoft Word stand-alone or Microsoft Office Word including Word 2003, Word 2007, Office 2000, and Office XP. You can get Word help on formatting text, tables, tabs, fonts, styles, general Word layouts, bullets, headings, and outlines, using templates, toolbar modifications, and using Track Changes. You may also find tips on linking Word and Excel embedded objects including charts. This site does not provide a general Word tutorial nor the basics of using a word processor. It provides specific answers to using Microsoft Word only. If you do not see your Word question answered in this area then please ask a Word question here

Microsoft Word

All Answers

Answers by Expert:

Ask Experts


Aidan Heritage


I have provided first hand support since `95 for Microsoft Office majoring in Word and Excel - support for all versions of Word from 2 onwards

©2017 All rights reserved.