0 Replies Latest reply on Aug 29, 2015 6:10 AM by Brusjo

    InDesign MergeLayer command Error

    Brusjo

      Hello,

      I have problem When I run InDesign MergeLayer script

       

      My Envinroment:

      Windows 7 64bit

      Visual Studio 2013, Visual Basic 2013

      Indesign CS6

       

      MergeLayer script

      e.g.

      Dim myLayerA As InDesign.Layer = InDDocument.Layers.Item(1)

      Dim myLayerB As InDesign.Layer = InDDocument.Layers.Item(2)

      myLayerA.Merge(myLayerB)

       

      I get following Error:

      -2147467262 Unable to cast COM object of type 'System.__ComObject' to interface type 'InDesign.Layers'.

      This operation failed because the QueryInterface call on the COM component

      for the interface with IID '{CF550CEA-6B35-47B3-9149-5819BF3E7F35}'

      failed due to the following error:

      No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

       

       

      I run scripts for all other Layer commands without problem.

      e.g.

      Dim myLayerA As InDesign.Layer = InDDocument.Layers.Item(1)

      Dim myLayerB As InDesign.Layer = InDDocument.Layers.Item(2)

      myLayerA.Move(idLocationOptions.idAfter, myLayerB)

      etc.

       

      thanks for any advice or solution.

       

      John