I have a docked cell in a stylesheet (with shortcuts for editing the notebook). Is there an option I can set so that this cell is not displayed in CDF?
Edit Based on answer by @MikeHoneychurch and the reference provided, here is the code I ended up using. Note this code deploys a notebook to a CDF removing any docked cells and cells tagged with "delete me". It will also ensure that styles embedded in the notebook are copied over to the CDF. Further changes may be required if the notebook inherits a stylesheet (refer to answer and link provided by @MikeHoneychurch).
Button["Save as CDF",
(*Get the directory/name of the current notebook and change the .nb to .cdf; use this as the default path for the deployed CDF*)
tmp = EvaluationNotebook[];
cdfDefaultName = NotebookFileName[EvaluationNotebook[]];
cdfDefaultName = StringReplace[cdfDefaultName, ".nb" -> ".cdf"];
cdfFileName =
SystemDialogInput["FileSave", {cdfDefaultName, {"CDF Files" -> {"*.cdf"}}}];
(*Get a copy of the private stylesheet a.k.a child and delete the docked cell*)
child = Options[tmp, StyleDefinitions];
childstyles = Cases[child, Cell[StyleData[_, ___], __], \[Infinity]];
modchildstyles = DeleteCases[childstyles, Rule[DockedCells, _], \[Infinity]];
(*Remove specified cells from the notebook *)
tmp1 = First@NotebookGet[EvaluationNotebook[]];
tmp1 = tmp1 /. CellGroupData[{Cell[_, "Input", ___, CellTags -> "delete me", ___], ___}, ___] :> Sequence[];
(*Deploy the CDF*)
CDFDeploy[cdfFileName, Notebook[tmp1, StyleDefinitions ->
Notebook[modchildstyles, StyleDefinitions -> "PrivateStylesheetFormatting.nb"]]],
ImageSize -> 100, Method -> "Queued"]