Skip navigation
Currently Being Moderated

Get layers by name VBA

Apr 7, 2012 5:27 AM

Tags: #vba #layers #groups #getbyname

hi all

Is it possible to reference layers or groups by their names instead of their index using VBA? If so, what is the sytax? I know you can do it in Extendscript, but I'm not finding info for VBA.

 

thanks

 
Replies
  • Currently Being Moderated
    Apr 7, 2012 10:37 AM   in reply to duhwellhuh

    just add the name instead of the index, works as well with Javascript

     

    ActiveDocument.Layers("ab")
    
     
    |
    Mark as:
  • Currently Being Moderated
    Apr 7, 2012 6:24 PM   in reply to duhwellhuh

    you're welcome. yes, it works the same with all pageItems. There's no getByName in VBA, and not sure if it is documented, but the use of the name works in vb and js.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 7, 2012 6:46 PM   in reply to duhwellhuh

    cool, if you're replicating my samples, try typing everything yourself instead of copy/pasting, it works wonders, at least for me.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points