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

NotebookRead

NotebookRead[notebook]
gives the expression corresponding to the current selection in the specified notebook object.
  • NotebookRead is the basic way to get into the kernel pieces of notebooks that are being manipulated by the front end.
This creates a document notebook:
This selects the first cell:
This reads the cell and returns its Cell expression:
This creates a document notebook:
In[1]:=
Click for copyable input
Out[1]=
This selects the first cell:
This reads the cell and returns its Cell expression:
In[3]:=
Click for copyable input
Out[3]=
Create a notebook and move the selection to the first "T":
Read the current selection:
Select multiple cells and read the content:
Select and read graphics:
Display the result:
A palette that reads the word at the current selection and makes it uppercase:
New in 3