Share via


PrintToOutputWindow Method

Home Page (Objects)OverviewFAQReference

Applies to: Application object

Directs the output from a macro to the Macro tab of the Output window.

Syntax

object**.PrintToOutputWindow**string

Parameters

object

An expression that evaluates to an Application object. When you use the PrintToOutputWindow method of the Application object, you can omit object because the name of the Application object is implied when you access its properties and methods.

string

A String that includes the output directed to the Macro tab of the Output window.

Remarks

The output directed by PrintToOutputWindow can contain any string a macro produces. However, this output typically contains data not displayed in a message box, such as debugging messages, logging data from a build, or the results of a file search.

Example

The following example iterates through the Breakpoints collection and displays the details about each breakpoint before removing it:

Dim bp
for each bp in Debugger.Breakpoints
   PrintToOutputWindow(bp.Location)
   PrintToOutputWindow(bp.File)
   PrintToOutputWindow(bp.Function)
   PrintToOutputWindow(bp.Executable)
   PrintToOutputWindow(bp.Condition)
   PrintToOutputWindow(bp.Enabled)
   PrintToOutputWindow(bp.PassCount)
   PrintToOutputWindow(bp.Message)
   PrintToOutputWindow(bp.WindowProcedure)
   PrintToOutputWindow(bp.Type)
   bp.Remove
next