NotebookFind

NotebookFind[notebook, data]
sets the current selection in the specified notebook object to be the next occurrence of data.

NotebookFind[notebook, data, Previous]
sets the current selection to be the previous occurrence.

NotebookFind[notebook, data, All]
sets the current selection to be all occurrences.

NotebookFind[notebook, data, dir, elems]
sets the current selection to be the occurrence in the direction dir and searches the elements of cells specified by elems.

Details and OptionsDetails and Options

  • NotebookFind returns $Failed if the search it performs finds no occurrence of data.
  • notebook must be a NotebookObject, as returned by NotebookOpen, etc.
  • data can be a string, box expression, or a complete cell.
  • Possible values of dir include , , and All.
  • The possible elements are:
  • CellContentscontents of each cell, represented as a string
    CellLabelsetting for the CellLabel option of each cell
    CellStylename of style for each cell
    CellTagsparts of the setting for the CellTags option for each cell
    {elem1,elem2,...}list of different types of elements
  • The default for elems is . Only the contents of boxes, not their styles or options, are included in the search.
  • Unless the option setting AutoScroll->False is given, the front end will scroll a notebook so that the result of NotebookFind is visible. »
  • The front end will also usually highlight the region corresponding to the result.
New in 3
New to Mathematica? Find your learning path »
Have a question? Ask support »