Working in VB, InD CS3. I have a feeling this is like the 'ol autoflow thing, but here goes.
I can script the application of a master to multiple pages by iterating through the pages or spreads, but it runs to slow (not that I'm impatient or anything).
I'm wondering if there is an equivalent to using the "Apply Masters to Pages..." option from the pages panel which goes nearly instantly even on some of our longer documents.
I thought I might be able to do this to apply masters to all pages:
Set pgs = Ind.ActiveDocument.Spreads.ItemByRange(Ind.ActiveDocument.Spreads(1), Ind.ActiveDocument.Spreads(-1))
pgs.AppliedMaster = Ind.ActiveDocument.MasterSpreads("LNG-TXT")
but it errors trying to set the master, I'm sure its because pgs is a collection of masters.
Any help is much appreciated.
All the best,
It looks like you are missing .item()
This works for me (in JS):
app.documents.pages.everyItem().appliedMaster = app.documents.masterSpreads.item(0);