Saving to distinct MIF version not possible in script
In the following script MIF is saved in the version of the current FM. For example, if FM-16 (2020) is active, then the script save as MIF-16.
KLD_Z.SaveDocToMif = function (oDoc, saveName) { // ===========================
/* Save document to MIF at the same location as the original document
Arguments oDoc Document to be saved
saveName File name e.g. oDoc.Name + ".mif"
Reference Rick Quatro in
https://community.adobe.com/t5/framemaker-discussions/
creation-of-extra-dialogue-in-framemaker-for-templates/td-p/13664579
*/
var params, returnParams, j; // 1
// 2
params = GetSaveDefaultParams (); // 3
returnParams = new PropVals (); // 4
j = GetPropIndex (params, Constants.FS_FileType); // 5
params[j].propVal.ival = Constants.FV_SaveFmtInterchange; // 6
// 7
oDoc.Save (saveName, params, returnParams); // 8
if (FA_errno === 0) { // 9
return saveName; // 10
} else { // 11
PrintSaveStatus (returnParams); // 12
} // 13
} // --- end SaveDocToMif -----------------------------------------------------
However, I wanted to save as a distinct MIF version (say, MIF-14) out of FM-16.
For this purpose I changed in line 6 FV_SaveFmtInterchange to FV_SaveFmtInterchange140
This does however, not save at all (line 8). It results in reporting SaveStatus as FV_BadSaveScriptValue.
► How to save as a distinct MIF version similar to save as distinct FM-version?

