Frames.Add Method (Word)

Returns a Frame object that represents a new frame added to a range, selection, or document.

Syntax

expression. Add( _Range_ )

expression An expression that returns a 'Frames' object.

Parameters

Name Required/Optional Data Type Description
Range Required [RANGE] The range that you want the frame to surround.

Return Value

Frame

Example

This example adds a frame around the selection.

ActiveDocument.Frames.Add Range:=Selection.Range

This example adds a frame around the third paragraph in the selection.

Set myFrame = Selection.Frames _ 
 .Add(Range:=Selection.Paragraphs(3).Range)

See also

Frames Object