Answered
Script to edit Custom text variable
I just need a simple script that will change the contents of my custom text variable.
I have a copyright date set as a variable, this variable adjusts the date in mutliple places, I'm just trying to find script language to add to my new year updates script so I dont have to go into the vairable each time I'm updating a old document.

this is what Ive been playing with but clearly isnt working
var doc = app.activeDocument;
var copyD = doc.textVariables.item ('Copyright date').variableOptions;
if (copyD.content == "2021") { copyD.content = "2022"; }