Question
Save FrameMaker 2020 to 2019 via ExtendScript bug
When I save a FrameMaker 2020 file down to FrameMaker 2019 using ExtendScript, the top line of the file still says <MakerFile 16.0> so it won't open in 2019. It works in the interface with File > Save As.
#target framemaker
var doc;
doc = app.ActiveDoc;
saveDoc (doc);
doc.Close (true);
function saveDoc (doc) {
var params, returnParams, i;
params = GetSaveDefaultParams ();
returnParams = new PropVals ();
i = GetPropIndex (params, Constants.FS_FileType);
params[i].propVal.ival = Constants.FV_SaveFmtBinary150;
i = GetPropIndex (params, Constants.FS_AutoBackupOnSave);
params[i].propVal.ival = Constants.FV_SaveNoAutoBackup;
i = GetPropIndex (params, Constants.FS_FileIsInUse);
params[i].propVal.ival = Constants.FV_ResetLockAndContinue;
FA_errno = 0;
doc.Save (doc.Name, params, returnParams);
if (FA_errno !== 0) {
PrintSaveStatus (returnParams);
}
}

