Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is probably fairly straightforward, but I wasn't able to find it right away. I'd like for Mathematica to display on startup the latest notebook I was working on, and nothing else. No additional old notebooks and no new blank notebook. There is probably an option hiding somewhere to do that, but I wasn't able to find it. Apologies if this is too simple.

share|improve this question
up vote 2 down vote accepted

R.M beat me but I'll post this anyway for variety.

You can open the last Notebook with:

Options[$FrontEnd, NotebooksMenu][[1, 2, -1, 2, 1]] // NotebookOpen

Methods for preventing the opening of a blank Notebook, for both version 7 and 8 are here:

How do I prevent auto loading of blank notebook at startup?

share|improve this answer

The list of recently opened notebooks (as shown in File > Open Recent) is saved in the NotebooksMenu option for $FrontEnd, arranged by ascending absolute time (i.e., most recent is last). So the most recent notebook can be opened with:

Last[NotebooksMenu /. Options@$FrontEnd] /. 
    HoldPattern[_ -> {file_, ___}] :> NotebookOpen@file

Some additional related questions that might of interest are:

share|improve this answer
Thanks, I always get the last notebook opened, I was mainly interested in avoiding the automatic opening of all other notebooks, especially the blank one. – Moshe Oct 13 '12 at 19:00
@Moshe that is answered here: – Mr.Wizard Oct 13 '12 at 19:03
@Moshe Mr.Wizard's link answers that specific question. A complementary question then, is to open just a specific notebook each and every time. That is answered here: – R. M. Oct 13 '12 at 19:04
@Mr.Wizard, thanks, I'll take a look. Maybe my question can be closed as a duplicate then. – Moshe Oct 13 '12 at 19:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.