This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

NotebookSelection

NotebookSelection
represents the current selection in the current evaluation notebook in the front end.
NotebookSelection[nb]
represents the current selection associated with the open notebook nb.
  • You can use Options and SetOptions to read and write options associated with your current selection.
Select some text and then set a font option for it:
Find out the option settings for the selected text:
Select some text and then set a font option for it:
In[1]:=
Click for copyable input
Find out the option settings for the selected text:
In[4]:=
Click for copyable input
Out[4]=
Apply a named style to a selection:
Set an option for selected graphics:
You do not need to use NotebookSelection with most notebook-manipulating functions:
Some options are not applicable to individual cells or cell contents:
New in 3