Frame.VerticalDistanceFromText property (Word)
Returns or sets the vertical distance (in points) between a frame and the surrounding text. Read/write Single.
Syntax
expression. VerticalDistanceFromText
expression An expression that returns a 'Frame' object.
Example
This example sets the vertical distance between the selected frame and the surrounding text to 12 points.
If Selection.Frames.Count = 1 Then
Selection.Frames(1).VerticalDistanceFromText = 12
End If
This example adds a frame around the selection and sets several properties of the frame.
Set aFrame = ActiveDocument.Frames.Add(Range:=Selection.Range)
With aFrame
.HorizontalDistanceFromText = InchesToPoints(0.13)
.VerticalDistanceFromText = InchesToPoints(0.13)
.HeightRule = wdFrameAuto
.WidthRule = wdFrameAuto
End With
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for