I would like to use "Evaluate Initialization Cells" to open a CellGroup in a notebook. However, the following code doesn't work if placed in an initialization cell:
SelectionMove[SelectedNotebook[], Previous, CellGroup];
FrontEndTokenExecute["SelectionOpenAllGroups"]
When I manually press shift-enter (on the closed CellGroup), then it works as expected by opening the CellGroup. Unfortunately, if I place this code in an initialization cell (in the appropriate location before or after the CellGroup I wish to have opened), the CellGroup doesn't open.
Alternatively, is there an option I can set for CellGroups as there is for a single cell such as using SetOptions
with CellOpen -> True
?