var InD = Application ( "Adobe InDesign CC 2014" ) ; var doc = InD . documents ; var docLength = doc . length ; InD . includeStandardAdditions = true ; InD . displayDialog ( docLength . toString ( ) ) ;