How do I convert an arbitrary box specification extracted from a cell expression into an input expression?
This came up as a problem with my answer to Save Mathematica c
Honestly I am not sure what you're trying to do, but I suspect you will need to use the FrontEnd itself for processing. Here is a generic example:
FrontEndExecute@FrontEnd`CellPrint[
BoxData[RowBox[{"StringForm", "[", RowBox[{"\"\<\!\(\*
StyleBox[\"a\",
FontSlant->\"Italic\"]\) = ``\>\"", ",", " ", "1"}], "]"}]]
]
However, I don't know what format you actually want to get.