I've tried lots of combinations, e.g. .itemByName("NAME"); .item("NAME"), but none of them worked for me. I was only able to select a frame by its index ("...masterPageItems;").
Jan ... thankful for any advice!
You can't. myPage.masterPageItems is Array of page items, and not a collection.
You have to loop through all master page items and find items that you want,
or maybe find applied master page, and then do something like this:
Hope that helps.
Marijan, you saved my evening, thank you so much. It would have taken many days to find the last mentioned solution by myself.