InsertFrame

Syntax

InsertFrame

Remarks

Inserts an empty frame, or frames the selected text, graphic, or both. If there is no selection, Word inserts a 1-inch – square frame at the insertion point (the frame appears as a square in page layout view). You can change the dimensions of the frame with FormatFrame.

Example

This example inserts a frame and then positions it in the margin to the left of the current paragraph, so the user can type a margin note in it. If the active document is not in page layout view, Word displays a message box asking if the user wants to switch to page layout view.


SelType 1
If ViewPage() = 0 Then
    ans = MsgBox("Switch to page layout view?", \
            "Insert Margin Note", 36)
    If ans = - 1 Then ViewPage
End If
InsertFrame
FormatFrame .Wrap = 1, .WidthRule = 1, .FixedWidth = ".75 in", \
        .PositionHorz = "Left", .PositionHorzRel = 1, \
        .DistFromText = "0.13 in", .PositionVert = "0", \
        .PositionVertRel = 2, .DistVertFromText = "0"
SelType 1 : FontSize 8 : Italic 1
ToolsOptionsView .HScroll = 1
HScroll 0

See Also

FormatFrame, RemoveFrames