Recently both our users and developers have contributed a large amount of good articles and demonstrations on Community. It is a great adventure to read through the notebooks and play around the codes. Sometimes you may want to create another notebook along side with only input cells (executable parts only), so you can quickly run all notebook quickly and view the results avoiding long scroll.
Here are two ways you can make it happen:
- Use build-in
AuthorToolsand the documented tutorial

Or you can
-
Put the following script in the top line of your notebook from which you need to extract input codes. This method is more general because you can choose any style you like in the
Casesfunction, note limit toInputstyle. AndAlternativelets you pick multiple styles at the same time:this = EvaluationNotebook[]; new = NotebookGet[EvaluationNotebook[]]; new = Cases[new, Cell[__, "Input" | "Code", ___], \[Infinity]]; nb = CreateDocument[new]; SelectionMove[nb, Next, Cell]; NotebookDelete[nb]; Pause[3]; NotebookClose[this]

– you have earned Featured Contributor Badge