DocumentationMathematicaThe Mathematica BookMathematica Reference GuideDeveloper Context Objects in Mathematica 5
Developer`MessagesNotebook
MessagesNotebook[ ] gives the notebook to which messages generated by the notebook front end will be sent.
MessagesNotebook returns a NotebookObject. See also: SelectedNotebook, EvaluationNotebook.