How to change border settings? RRS feed

  • Question

  • Hi

    I have the following code that adds a border and then resizes all photos in the document. Unfortunately this keeps making the border setting in the Borders and Shading dialogue to 3D, which means the border doesn't like right.

    Sub AllPictSize()
        Dim PecentSize As Integer
        Dim oIshp As InlineShape
        PercentSize = InputBox("Enter percent of full size", "Resize Picture", 59)
        For Each oIshp In ActiveDocument.InlineShapes
          With oIshp
            With .Borders
              .OutsideLineStyle = wdLineStyleThinThickMedGap
              .OutsideLineWidth = wdLineWidth300pt
              .DistanceFromLeft = 10
            End With
            .ScaleHeight = PercentSize
            .ScaleWidth = PercentSize
          End With
        Next oIshp
      End Sub

    Is there any way to change that setting back to box, or maybe a work around?

    Thanks for any help.

    Wednesday, August 10, 2011 11:20 AM


  • You might try taking out the With Borders command and instead along with the .ScaleHeight & Width properties add:

            .line.Visible = True
            .line.Style = msoLineSingle
            .line.Weight = wdLineWidth025pt

    Kind Regards, Rich ...
    Wednesday, August 10, 2011 11:54 AM