Document.DefaultTargetFrame Property (Word)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Returns or sets a String indicating the browser frame in which to display a Web page reached through a hyperlink. Read/write.

expression .DefaultTargetFrame

expression An expression that returns a Document object.

While the DefaultTargetFrame property can use any user-defined string, it has the following predefined strings: "_top", "_blank", "_parent", and "_self".

This example sets Microsoft Word to open a new blank browser window when a user clicks a hyperlink in the active document.

Sub DefaultFrame() 
 ActiveDocument.DefaultTargetFrame = "_blank" 
End Sub
Show: