Export (0) Print
Expand All

Application Object

Office 2003
Application
Multiple objects

Represents the Microsoft 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 Visual Basic's 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 | AnswerWizard Property | Application Property | ArbitraryXMLSupportAvailable Property | Assistant Property | AutoCaptions Property | AutoCorrect Property | AutoCorrectEmail Property | AutomationSecurity Property | BackgroundPrintingStatus Property | BackgroundSavingStatus Property | BrowseExtraFileTypes Property | Browser Property | Build Property | CapsLock Property | Caption Property | CaptionLabels Property | CheckLanguage Property | COMAddIns Property | CommandBars Property | Creator Property | CustomDictionaries Property | CustomizationContext Property | DefaultLegalBlackline Property | DefaultSaveFormat Property | DefaultTableSeparator Property | Dialogs Property | DisplayAlerts Property | DisplayAutoCompleteTips Property | DisplayRecentFiles Property | DisplayScreenTips Property | DisplayScrollBars Property | DisplayStatusBar Property | Documents Property | EmailOptions Property | EmailTemplate Property | EnableCancelKey Property | FeatureInstall Property | FileConverters Property | FileDialog Property | FileSearch Property | FindKey Property | FocusInMailHeader Property | FontNames Property | HangulHanjaDictionaries Property | Height Property | International Property | IsObjectValid Property | KeyBindings Property | KeysBoundTo Property | LandscapeFontNames Property | Language Property | Languages Property | LanguageSettings Property | Left Property | ListGalleries Property | MacroContainer Property | MailingLabel Property | MailMessage Property | MailSystem Property | MAPIAvailable Property | MathCoprocessorAvailable Property | MouseAvailable Property | Name Property | NewDocument Property | NormalTemplate Property | NumLock Property | Options Property | Parent Property | Path Property | PathSeparator Property | PortraitFontNames Property | PrintPreview Property | RecentFiles Property | ScreenUpdating Property | Selection Property | ShowStartupDialog Property | ShowVisualBasicEditor Property | ShowWindowsInTaskbar Property | SmartTagRecognizers Property | SmartTagTypes Property | SpecialMode Property | StartupPath Property | StatusBar Property | SynonymInfo Property | System Property | TaskPanes 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 | XMLNamespaces Property

Parent Objects



Show:
© 2014 Microsoft