• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Applying Master Pages

Guest
Jul 21, 2011 Jul 21, 2011

Copy link to clipboard

Copied

I want to apply Master Pages to a single document, using the StructMasterPageMaps table on that document's reference pages.

I see the ApplyMasterPage method for a single page, but the only way I've found to use the page map is as part of a book update.

My current workaround is to create a new book, add the file to that book, update the book with only the UpdateBookMasterPages parameter set to True, then close the book without saving it. This works well enough, but it just seems so hacky.

Did I overlook something? Is there a better way to do this?

TOPICS
Scripting

Views

1.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jul 21, 2011 Jul 21, 2011

Copy link to clipboard

Copied

Oliver,

  To apply the master page mapping table to a single document, use Format > Page Layout > Apply Master Pages.

       --Lynne

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 21, 2011 Jul 21, 2011

Copy link to clipboard

Copied

Sorry, Lynne--

I should have been more clear in my post. I am trying to accomplish this via ExtendScript.

Oliver

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jul 22, 2011 Jul 22, 2011

Copy link to clipboard

Copied

Oliver,

there is an internal command ApplyMasterPages and in one report I find the FCode to be listed as 21040624 (decimal). But, as this feature is added to FrameMaker via an FDK client (fminit\Plugins\masterpages.dll), I guess the FCode values are assigned dynamically and may be different each time. I guess you could parse the menu command structure to find the command and read the FCode from it… ugly, I know!

The FDK documents (fdkref.pdf) contain a segment about calling clients shipped with FrameMaker, but at least the version I am looking at does not explain the masterpages.dll.

Maybe this helps a little bit,

- Michael

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 22, 2011 Jul 22, 2011

Copy link to clipboard

Copied

LATEST

Thank you, Michael. Your post provided the key I was looking for:

Fcodes([app.GetNamedCommand("ApplyMasterPages").Fcode])

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines