Duplicate Quark Layout to another document

Hi, I am looking for a way to copy a layout space from one project to another.

I have tried:

set aLayout to object reference of layout space 1 of project 1 
duplicate aLayout to end of project 2

but this just duplicates the layout space in the current document?

Any ideas?

Thanks Mark

(Quark 6.5)

Hi Mark. I tried your script and it works fine IF a Project 2 already exists. If Project 1 is the only document that exists, then it duplicates the layout to the end of Project 1.

I think all you need is a check to see if Project 2 exists and if not have it created. You will have to fill in all the details for the document specs (I always work with template files so I haven’t created a new document in a Quark scripts before to give you an example) but this basic form should work:

tell application "QuarkXPress"
	set aLayout to object reference of layout space 1 of project 1
	if not (exists project 2) then
		make new project --you will have to figure out how to define all of the properties of this new project
	end if
	duplicate aLayout to end of project 2
end tell

Model: G5 Tower (not Intel) - Script Editor ver 2.1.1
Browser: Safari 419.3
Operating System: Mac OS X (10.4)

Hi Matt-Boy,

Hmmmmm! I tried your script and it does exactly the same?

For some strange reason it ignores project 2 and duplicates the layout in project 1? (Project 2 is definately there, and I have tried referencing it by name as well - but no success).

I am using Quark 6.5.

Any other suggestions?