Duplicating Pages to Another Document
Happy New Year!
Working in CS3, VBA, PC.
I need to merge several InDesign documents in an on going project and have a script written that works by duplicating each individual page from one document to another. My code to duplicate each page looks like this.
Call FromDoc.Pages(pgs%).Duplicate(idLocationOptions.idAfter, ToDoc.Pages(-1))
I THOUGHT one the following would work to duplicate them all at once like you can with the Pages panel but I'm getting an error that the object doesn't support that method.
Call FromDoc.Pages.ItemByRange(FromDoc.Pages(1), FromDoc.Pages(-1)).Duplicate(idLocationOptions.idAfter, ToDoc.Pages(-1))
Call FromDoc.Pages.ItemByRange(1, -1).Duplicate(idLocationOptions.idAfter, ToDoc.Pages(-1))
If this simply not possible or am I missing something.
Many thanks,
Ken
