Application Object

Description

Represents the Word application. The Application object includes properties and methods that return top-level objects. For example, the ActiveDocument property returns a Document object.

Using the Application Object

Use the Application property to return the Application object. The following example displays the user name for Word.

MsgBox Application.UserName
Many of the properties and methods that return the most common user-interface objects — such as the active document (ActiveDocument property) — can be used without the Application object qualifier. For example, instead of writing Application.ActiveDocument.PrintOut, you can write ActiveDocument.PrintOut. Properties and methods that can be used without the Application object qualifier are considered "global." To view the global properties and methods in the Object Browser, click <globals> at the top of the list in the Classes box.

Remarks

To use Automation (formerly OLE Automation) to control Word from another application, use the CreateObject or GetObject function to return a Word Application object. The following Microsoft Excel example starts Word (if it's not already running) and opens an existing document.

Set wrd = GetObject(, "Word.Application")
wrd.Visible = True
wrd.Documents.Open "C:\My Documents\Temp.doc"
Set wrd = Nothing
Properties

ActiveDocument property, ActivePrinter property, ActiveWindow property, AddIns property, Application property, Assistant property, AutoCaptions property, AutoCorrect property, BackgroundPrintingStatus property, BackgroundSavingStatus property, BrowseExtraFileTypes property, Browser property, Build property, CapsLock property, Caption property, CaptionLabels property, CommandBars property, Creator property, CustomDictionaries property, CustomizationContext property, DefaultSaveFormat property, DefaultTableSeparator property, Dialogs property, DisplayAlerts property, DisplayAutoCompleteTips property, DisplayRecentFiles property, DisplayScreenTips property, DisplayScrollBars property, DisplayStatusBar property, Documents property, EnableCancelKey property, FileConverters property, FileSearch property, FindKey property, FocusInMailHeader property, FontNames property, Height property, International property, IsObjectValid property, KeyBindings property, KeysBoundTo property, LandscapeFontNames property, Languages property, Left property, ListGalleries property, MacroContainer property, MailingLabel property, MailMessage property, MailSystem property, MAPIAvailable property, MathCoprocessorAvailable property, MouseAvailable property, Name property, NormalTemplate property, NumLock property, Options property, Parent property, Path property, PathSeparator property, PortraitFontNames property, PrintPreview property, RecentFiles property, ScreenUpdating property, Selection property, ShowVisualBasicEditor property, SpecialMode property, StartupPath property, StatusBar property, SynonymInfo property, System property, Tasks property, Templates property, Top property, UsableHeight property, UsableWidth property, UserAddress property, UserControl property, UserInitials property, UserName property, VBE property, Version property, Visible property, Width property, Windows property, WindowState property, WordBasic property.

Methods

Activate method, AddAddress method, AutomaticChange method, BuildKeyCode method, CentimetersToPoints method, ChangeFileOpenDirectory method, CheckGrammar method, CheckSpelling method, CleanString method, DDEExecute method, DDEInitiate method, DDEPoke method, DDERequest method, DDETerminate method, DDETerminateAll method, GetAddress method, GetSpellingSuggestions method, GoBack method, GoForward method, Help method, HelpTool method, InchesToPoints method, KeyString method, LinesToPoints method, ListCommands method, LookupNameProperties method, MillimetersToPoints method, MountVolume method, Move method, NewWindow method, NextLetter method, OnTime method, OrganizerCopy method, OrganizerDelete method, OrganizerRename method, PicasToPoints method, PointsToCentimeters method, PointsToInches method, PointsToLines method, PointsToMillimeters method, PointsToPicas method, PrintOut method (Application, Document, and Window objects), Quit method, Repeat method, ResetIgnoreAll method, Resize method, Run method, ScreenRefresh method, SendFax method, ShowClipboard method, ShowMe method, SubstituteFont method.

Events

DocumentChange event, Quit event.

See Also

Global object.