Skip to content

Latest commit

 

History

History
64 lines (39 loc) · 1.37 KB

Word.Frame.HorizontalDistanceFromText.md

File metadata and controls

64 lines (39 loc) · 1.37 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Frame.HorizontalDistanceFromText property (Word)
vbawd10.chm153747459
vbawd10.chm153747459
Word.Frame.HorizontalDistanceFromText
40672084-cced-8807-8843-0750ef5a48b9
06/08/2017
medium

Frame.HorizontalDistanceFromText property (Word)

Returns or sets the horizontal distance between a frame and the surrounding text, in points. Read/write Single.

Syntax

expression. HorizontalDistanceFromText

expression A variable that represents a 'Frame' object.

Example

This example adds a frame around the selection and sets the horizontal distance between the frame and the text to 12 points.

Dim frmNew As Frame 
 
Set frmNew = ActiveDocument.Frames.Add(Range:=Selection.Range) 
frmNew.HorizontalDistanceFromText = 12

This example adds a frame around the first paragraph and sets several properties of the frame.

Dim frmNew As Frame 
 
Set frmNew = ActiveDocument.Frames.Add _ 
 (Range:=ActiveDocument.Paragraphs(1).Range) 
 
With frmNew 
 .HorizontalDistanceFromText = InchesToPoints(0.25) 
 .VerticalDistanceFromText = InchesToPoints(0.25) 
 .HeightRule = wdFrameAuto 
 .WidthRule = wdFrameAuto 
 .Borders.Enable = False 
End With

See also

Frame Object

[!includeSupport and feedback]