Skip to main content
4everJang
Legend
December 17, 2018
Answered

Calling Apply Master Pages from a script

  • December 17, 2018
  • 1 reply
  • 2286 views

Hello scripting friends,

There is no method to apply master pages for the Doc object, but I know it can be done, as I have done this before. But I cannot find the script anymore to figure out how that worked. Does anyone have the FCode or CallClient info to do this ?

Thanks in advance

4everjang

This topic has been closed for replies.
Correct answer frameexpert

Hi Jang,

CallClient ("masterpages, book.id);

where "book" is your Book object.

or

var cmd = app.GetNamedCommand ("ApplyMasterPages");

Fcodes ([cmd.Fcode]);

The Fcode version will only work on the active document.

-Rick

1 reply

frameexpert
Community Expert
frameexpertCommunity ExpertCorrect answer
Community Expert
December 17, 2018

Hi Jang,

CallClient ("masterpages, book.id);

where "book" is your Book object.

or

var cmd = app.GetNamedCommand ("ApplyMasterPages");

Fcodes ([cmd.Fcode]);

The Fcode version will only work on the active document.

-Rick

www.frameexpert.com
4everJang
4everJangAuthor
Legend
December 17, 2018

Thanks. The Fcode is what I needed. I checked the long FCode constants defs in the Scripting Guide but apparently the name for the code is not really create to be intelligible - or the list is incomplete.

Ciao

Legend
December 17, 2018

Does the doc need an update here?