4 Replies Latest reply on Mar 17, 2010 7:16 AM by Jitendra Kumar Singh

    How to resolve "Object Required: "idMeasurementUnits"" error.

    Jitendra Kumar Singh

      Hi All,


      I am making the Indesign CS4 VB script, in which I am trying to set Horizontal and vertical measurenment uints as inches.


      The code which I have used as follows,

      Set myInDesign = CreateObject("InDesign.Application.CS4")

      Set myDocument = myInDesign.Documents.Add
      myDocument.ViewPreferences.HorizontalMeasurementUnits = idMeasurementUnits.idInches
      myDocument.ViewPreferences.VerticalMeasurementUnits = idMeasurementUnits.idInches


      Note that when I am running this script through command prompt, It gives the following error,

      "Object Required: "idMeasurementUnits"".


      and when i run the above script from Indesign script panel, then it works fine.


      But it is my requirnment to run script through command prompt.


      So please let me know if anyone have any idea how to resolve this error.