({{, (RefLink[FrontEndTokenExecute, paclet:ref/FrontEndTokenExecute])["cmd"]
executes the specified front end command token, typically corresponding to a front end menu item. }})

OpenersNotesSection(Spacer1)Details

(RefLink[FrontEndTokenExecute, paclet:ref/FrontEndTokenExecute])[nb,"cmd"] executes a command targeting a specific notebook.

(RefLink[FrontEndTokenExecute, paclet:ref/FrontEndTokenExecute])[nb,"cmd",param] executes a command with a parameter.

(RefLink[FrontEndTokenExecute, paclet:ref/FrontEndTokenExecute])[args] is equivalent to (RefLink[FrontEndExecute, paclet:ref/FrontEndExecute])[(RefLink[FrontEndToken, paclet:ref/FrontEndToken])[args]].

OpenersPrimaryExamplesSection(Spacer1)Examples  (2)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Create a new notebook by using a front end token command:

FrontEndTokenExecute["New"]

Create a notebook with two cells:

nb=CreateDocument[{TextCell["line1","Text"],TextCell["line2","Text"]}];

SelectionMove[nb,All,Notebook]

Merge the cells by using a (RefLink[FrontEndToken, paclet:ref/FrontEndToken]):

FrontEndTokenExecute[nb,"CellMerge"]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[SystemDialogInput, paclet:ref/SystemDialogInput])  ▪  (RefLink[FrontEndToken, paclet:ref/FrontEndToken])  ▪  (RefLink[FrontEndExecute, paclet:ref/FrontEndExecute])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Front End Tokens, paclet:tutorial/FrontEndTokens])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Low-Level Notebook Programming, paclet:guide/LowLevelNotebookProgramming])}, {▪(RefLinkPlain[Front End Tokens, paclet:guide/FrontEndTokens])}, {▪(RefLinkPlain[Programmatic Notebook & Interface Customization, paclet:guide/ProgrammaticNotebookAndInterfaceCustomization])}})}})