I like the built-in ConfidentialReport Stylesheet under Reports but I would like to be able to change the word "CONFIDENTIAL" displayed at top border to something of my choosing. Does anyone know how to do this?
$\begingroup$
$\endgroup$
4
-
1$\begingroup$ The location where "CONFIDENTIAL" is defined is in a confidential location in the installation folder and can not be disclosed. $\endgroup$– NasserCommented Dec 4, 2017 at 1:24
-
$\begingroup$ Nasser - I assume you are being serious in a funny way. Either way, do you know if there is a way to replicate this header-like strip for my own custom report. Thanks. $\endgroup$– Keith DCommented Dec 4, 2017 at 1:33
-
1$\begingroup$ I am just being funny. I could not find where this string is defined. May be a global search could find it. I do not know. It is not in the style sheet either. $\endgroup$– NasserCommented Dec 4, 2017 at 1:35
-
1$\begingroup$ ok...thanks for checking..and it was funny. $\endgroup$– Keith DCommented Dec 4, 2017 at 1:36
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
If you run this:
Cases[
Import[
FrontEnd`FindFileOnPath[
ToFileName@CurrentValue[EvaluationNotebook[], StyleDefinitions],
"StyleSheetPath"
] // FrontEndExecute
],
Cell[___, DockedCells -> _, ___],
\[Infinity]
]
You'll find it's defined in the All
style.
I'd suggest either just using:
SetOptions[EvaluationNotebook[],
DockedCells -> {Cell["S O M E T H I N G - E L S E",
"SBO", CellMargins -> {{0, 0}, {0, 0}},
CellFrame -> {{0, 0}, {0, 3}}, FontSize -> 12,
FontSlant -> "Plain", FontColor -> GrayLevel[1],
TextAlignment -> Center, CellFrameColor -> RGBColor[1, 0, 0],
Background -> RGBColor[0.65, 0.5, 0.45]]}
]
Or copying the file to the $UserBaseDirectory
and editing that:
file =
FrontEndExecute@
FrontEnd`FindFileOnPath[
ToFileName@CurrentValue[EvaluationNotebook[], StyleDefinitions],
"StyleSheetPath"
];
new =
FileNameJoin@{$UserBaseDirectory,
FileNameDrop[file, FileNameDepth[$InstallationDirectory]]};
Quiet@CreateDirectory[DirectoryName[new],
CreateIntermediateDirectories -> True];
CopyFile[file, new];
NotebookOpen[new, Editable -> True, Saveable -> True]