Apologies to all for repeating a question, but I have been unable to get the replies to work
The following two commands did work
XRef = NotebookOpen[FileNameJoin[{Directory[], "XRef.nb"}],
Visible -> False];
SelectionMove[XRef, After, Notebook];
I have a string variable defined as follows
xRefcardTitle = "XREF " <> cardName <> " " <> cardID
Which yields -- "XREF \"X2383901\" 2580879"
The following fails
NotebookWrite[XRef, Cell[xRefcardTitle , "Input"]]
xRefcardTitle
Yielding
NotebookWrite[$Failed, Cell["XREF \"X2383901\" 2580879", "Input"]]
How do I write this simple string variable (xRefcardTitle) to Xref.nb ?