Hi Mr_Cummin,
In you case, You need to initially Text variable text convert to Text format, after you can convert to create outlines. Try the below JS code.
app.activeDocument.textVariables.everyItem().convertToText();
app.activeDocument.stories.everyItem().createOutlines ();
thx,
csm_phil