Name related procedures in class Application (Word VBA)

This page presents procedures from class Application related to the theme Name: AutoCaptions, Caption, LookupNameProperties, Name and UserName

AutoCaptions

Returns an AutoCaptions collection that represents the captions that are automatically added when items such as tables and pictures are inserted into a document.

For information about returning a single member of a collection, see Returning an object from a collection.

Dim captionLoop as AutoCaption 
 
For Each captionLoop In AutoCaptions 
 If captionLoop.AutoInsert Then MsgBox captionLoop.Name 
Next captionLoop

Caption

Returns or sets the text displayed in the Title bar of the application window.

To change the caption of the application window to the default text, set this property to an empty string ("").

Application.Caption = ""

LookupNameProperties

Looks up a name in the global address book list and displays the Properties dialog box, which includes information about the specified name.

If this method finds more than one match, it displays the Check Names dialog box.

Syntax : expression.LookupNameProperties (Name)

Name: A name in the global address book.

Application.LookupNameProperties Name:="Don Funk"

Name

Returns the name of the specified object.

Dim strName As String
strName = Name

UserName

Returns or sets the user's name, which is used on envelopes and for the Author document property.

Application.UserName = "Andrew Fuller"