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

How to Map the styles in indesign

Guest
May 19, 2010 May 19, 2010

I have updated certain styles in template now I need to updated those styles in source indd file.

Do we have any way to map the styles or do we can replace the styles from one indd doc to another is there possible.

Otherwise do we have any other simplest way in indesign.

I have to replace more than 30 to 40 documents.

Then it take so long time.

Is there any script to make it soon.

TOPICS
Scripting
1.1K
Translate
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
Contributor ,
May 20, 2010 May 20, 2010

That is very handy, use this code

var theDocument = app.activeDocument;

//Choose Source file (from which you want to import styles).

var sourceFile = File.openDialog ("choose file", false);

//import paragraph styles

var paraImport = ImportFormat.PARAGRAPH_STYLES_FORMAT;

//This will import without overwrite existing styles.
var clashPolicy = GlobalClashResolutionStrategy.DO_NOT_LOAD_THE_STYLE;

theDocument.importStyles(paraImport, sourceFile, clashPolicy);

Mac

Translate
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
May 20, 2010 May 20, 2010

Thanks

It works now I can add the new style from one doc to another without overwriting. But what I need is how to replace the sytle name from one doc to another.

Acutally I have  10 indd files in that i need to change the style name according to the publishing standard but these indd doc already some guys did as they  wish that makes me a big probs.

Kindly give a solution in this matter.

Translate
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
Contributor ,
May 21, 2010 May 21, 2010

Try to find out this in OMV which is with ESTK.

//Change respective line to next line.

var clashPolicy = GlobalClashResolutionStrategy.DO_NOT_LOAD_THE_STYLE;

var clashPolicy = GlobalClashResolutionStrategy.LOAD_ALL_WITH_OVERWRITE;

Mac

Translate
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
May 22, 2010 May 22, 2010

The actual probs is I need to replace only the style naming not the style.

Example:

In indd file the style name is "Title" I need to replace this style name to Chapter Title.

Is this Possible in

scripting?

Translate
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
Engaged ,
May 22, 2010 May 22, 2010

REMO1980 wrote:

The actual probs is I need to replace only the style naming not the style.

Example:

In indd file the style name is "Title" I need to replace this style name to Chapter Title.

Is this Possible in

scripting?

Yes its possible ....

Check below code

//rename paragraph style

var myDoc = app.activeDocument;
if (myDoc.paragraphStyles.item("Title") != null)
{
myDoc.paragraphStyles.item("Title").name = "Chapter Title";
}

But if you importing template style and your template style naming is different then your document stye. I think you can also use delete old style and replace with your new style.

//delete and replace paragraph style

if (myDoc.paragraphStyles.item("Title") != null && myDoc.paragraphStyles.item("Chapter Title") != null)

{
myDoc.paragraphStyles.item("Title").remove("Chapter Title");
}

Shonky

Translate
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
May 23, 2010 May 23, 2010
LATEST

Thanks. Really it works.

Translate
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