Site logo

How to apply [unconditional] to conditional text?

Apply an empty array

JavaScript

main();

function main() {
	var doc = app.activeDocument;
	var tf = doc.textFrames;
	
	for (var i = 0; i < tf.length; i++) {
		var txt = tf[i].texts[0];
		txt.applyConditions[0] = [];
	}

}

VBScript

main

Function main()
	Set myInDesign = CreateObject("InDesign.Application")
	Dim myEmptyArray()
	For Each myDocument In myInDesign.Documents
		For Each myTextFrame In myDocument.TextFrames
			For Each myText In myTextFrame.Texts
				myText.AppliedConditions = myEmptyArray
			Next
		Next
	Next
End Function