({{, (RefLink[CreateDocument, paclet:ref/CreateDocument])[]
creates an empty document notebook and opens it in the front end.}, {, (RefLink[CreateDocument, paclet:ref/CreateDocument])[expr]
creates and opens a document notebook containing the expression expr.}, {, (RefLink[CreateDocument, paclet:ref/CreateDocument])[{(Subscript[expr, 1]),(Subscript[expr, 2]),…}] 
creates and opens a document notebook consisting of a sequence of cells containing the (Subscript[expr, i]).}, {, (RefLink[CreateDocument, paclet:ref/CreateDocument])[expr,obj]
replaces the notebook represented by the notebook object obj with the one obtained from expr.}})

OpenersNotesSection(Spacer1)Details and Options

Possible forms for expr and (Subscript[expr, i]) include:

(RefLink[CreateDocument, paclet:ref/CreateDocument]) can take any notebook option, together with the following additional options:

(RefLink[CreateDocument, paclet:ref/CreateDocument]) will by default create a notebook with name "Untitled-n".

(RefLink[CreateDocument, paclet:ref/CreateDocument]) returns a (RefLink[NotebookObject, paclet:ref/NotebookObject]) corresponding to the notebook it creates.

(RefLink[CreateDocument, paclet:ref/CreateDocument])[expr,obj] overwrites whatever data was contained in the notebook represented by the notebook object obj.

OpenersPrimaryExamplesSection(Spacer1)Examples  (11)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

CreateDocument[{x+y,1/x+1/y}];

Specify styles for cells:

CreateDocument[{TextCell["The head","Section"],TextCell["first cell"]}];

OpenersExampleSection1(Spacer1)Scope  (4)

Create a notebook with a two-dimensional typeset expression:

CreateDocument[{TextCell["S1","Section"],ExpressionCell[x^2,"Input"]}];

Create a document containing an unevaluated expression:

CreateDocument[Defer[1+1]];

Create a notebook with a graphic:

CreateDocument[Plot[x^2,{x,-1,1}]];

Create a notebook with a grid:

CreateDocument[Grid[Array[a,{2,3}]]];

OpenersExampleSection2(Spacer1)Options  (4)

OpenersExampleSubsection0(Spacer1)CellDingbat  (1)

Set a cell dingbat:

CreateDocument[{a,b},CellDingbat->"\[MathematicaIcon]"];

OpenersExampleSubsection1(Spacer1)CellGrouping  (1)

Make a document with manually grouped cells:

CreateDocument[{CellGroup[{"a","b"}],"c"},CellGrouping->Manual];

OpenersExampleSubsection2(Spacer1)TextAlignment  (1)

Align contents on the right:

CreateDocument[{"a","b"},TextAlignment->Right];

OpenersExampleSubsection3(Spacer1)Visible  (1)

Create a notebook that is not visible:

nb=CreateDocument[{"a","b"},Visible->False];

Make the notebook appear:

SetOptions[nb,Visible->True]

OpenersExampleSection3(Spacer1)Properties & Relations  (1)

(RefLink[CreateDocument, paclet:ref/CreateDocument]) combines the functions of (RefLink[DocumentNotebook, paclet:ref/DocumentNotebook]) and (RefLink[CreateWindow, paclet:ref/CreateWindow]):

CreateWindow[DocumentNotebook["abc"]];

CreateDocument["abc"];

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[DocumentNotebook, paclet:ref/DocumentNotebook])  ▪  (RefLink[CreateNotebook, paclet:ref/CreateNotebook])  ▪  (RefLink[PopupWindow, paclet:ref/PopupWindow])  ▪  (RefLink[WindowSize, paclet:ref/WindowSize])  ▪  (RefLink[WindowMargins, paclet:ref/WindowMargins])  ▪  (RefLink[Saveable, paclet:ref/Saveable])  ▪  (RefLink[CreatePalette, paclet:ref/CreatePalette])  ▪  (RefLink[CreateDialog, paclet:ref/CreateDialog])  ▪  (RefLink[NotebookOpen, paclet:ref/NotebookOpen])  ▪  (RefLink[NotebookClose, paclet:ref/NotebookClose])  ▪  (RefLink[NotebookImport, paclet:ref/NotebookImport])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Notebook Document Generation, paclet:guide/DocumentGeneration])}, {▪(RefLinkPlain[Automated Reports, paclet:guide/AutomatedReports])}, {▪(RefLinkPlain[Standalone Interfaces, paclet:guide/StandAloneInterfaces])}, {▪(RefLinkPlain[Low-Level Interface Control, paclet:guide/LowLevelInterfaceControl])}, {▪(RefLinkPlain[Palettes, paclet:guide/Palettes])}})}})