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

Import Styles (Specific Style)

Contributor ,
Jul 18, 2018 Jul 18, 2018

Copy link to clipboard

Copied

Hi,

     I need to import specific styles from one document to another document as shown in the below screenshot. I have searched in forum, from that what i feel is , we can import all styles only.

     Don't know how to import specific character and paragraph styles ?

ScreenShot 81.jpg

- Sudha K

TOPICS
Scripting

Views

1.9K

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
Contributor ,
Jul 18, 2018 Jul 18, 2018

Copy link to clipboard

Copied

hi sudha,

     uncheck all style first and then select that specific style you want to import in a document.ss.png

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
Contributor ,
Jul 18, 2018 Jul 18, 2018

Copy link to clipboard

Copied

Hi,

     I need to do this in script. Not in manual.

    

    I need to do import specific styles (using style names) into new or another document using javascript.  Is it possible??

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
Contributor ,
Jul 18, 2018 Jul 18, 2018

Copy link to clipboard

Copied

It is not possible to import specific style, you can import all paragraph style or character style or object style, etc

but not single paragraph style or character style.

var myDoc = app.documents[0];

var preFile = File("filePath")

myDoc.importStyles(ImportFormat.PARAGRAPH_STYLES_FORMAT, preFile, GlobalClashResolutionStrategy.LOAD_ALL_WITH_OVERWRITE);

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
Contributor ,
Jul 18, 2018 Jul 18, 2018

Copy link to clipboard

Copied

We can do that as manual in an InDesign but scripting does not contain the automation for that.

Is there is anyother way to do that in automation??

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
Contributor ,
Jul 18, 2018 Jul 18, 2018

Copy link to clipboard

Copied

If you want to import single paragraph style which is not done through scripting but you want to import only all paragaph style you can do by scripting

myDoc.importStyles(ImportFormat.PARAGRAPH_STYLES_FORMAT, preFile, GlobalClashResolutionStrategy.LOAD_ALL_WITH_OVERWRITE);

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
Community Expert ,
Jul 18, 2018 Jul 18, 2018

Copy link to clipboard

Copied

Hi,

if you absolutely want to do this with method importStyles() add a new document, duplicate text that is styled the right way to the new document and use importStyles() with the new document that will contain this custom style only.

Regards,
Uwe

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
Contributor ,
Jul 18, 2018 Jul 18, 2018

Copy link to clipboard

Copied

Hi,

     Sorry... Can u explain me clearly...

     New document should contains that specific styles alone (ie., the styles which i need to import)  then i should use that document to importstyles right??

     Another way, using menu action we can bring load styles dialog, after that how can to proceed that??

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
Community Expert ,
Jul 18, 2018 Jul 18, 2018

Copy link to clipboard

Copied

https://forums.adobe.com/people/Sudha+K  wrote

Hi,

     Sorry... Can u explain me clearly...

     New document should contains that specific styles alone (ie., the styles which i need to import)  then i should use that document to importstyles right??…

Right.

If you want a menu action what is the purpose of your script?
The user can do it with the Import Styles or Import All Styles menu items.

Regards,
Uwe

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
Contributor ,
Jul 18, 2018 Jul 18, 2018

Copy link to clipboard

Copied

Hi,

       What is my purpose is need to load particular styles alone (pls refer screenshot which i posted earlier)  into another document from user inputs by matching style names.

     Is it possible using applescript??

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
Community Expert ,
Jul 19, 2018 Jul 19, 2018

Copy link to clipboard

Copied

Don't think there are more options with AppleScript.

What other means do we have to bring in styles?

1. Import of IDMS snippet files.

2. Import of Tagged Text.*

3. Import RTF text.*

*Don't think that all properties of paragraph styles are supported.

E.g think of GREP Styles and other nested styles.

Regards,
Uwe

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
Contributor ,
Jul 19, 2018 Jul 19, 2018

Copy link to clipboard

Copied

Sorry... can you please clear..

1. I am doing load style option in an InDesign using javascript. As i checked, i think there is no possibility to load particular style into another document. is it? or option is there?

2. I thought of using applescript click event, can do this but could not able to find the control of style name control (ie., checkbox with corresponding style name).

Is there is any other   option to do this?

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
Participant ,
Jul 19, 2018 Jul 19, 2018

Copy link to clipboard

Copied

You can also copy some styled text and paste it into another document via script. The styles will be created automatically.

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
Community Expert ,
Jul 19, 2018 Jul 19, 2018

Copy link to clipboard

Copied

LATEST

https://forums.adobe.com/people/Sudha+K  wrote

Sorry... can you please clear..

1. I am doing load style option in an InDesign using javascript. As i checked, i think there is no possibility to load particular style into another document. is it? or option is there? …

There is. If you restrict the number of styles to the ones that are needed.

I outlined a workaround already.

For that you need a temp document where you duplicate text to where the style(s) is/are applied and use that document as target for method importStyles() as second argument. Or you have a template document where all the styles are there, you then format some text with the needed styles in that document, remove all others and use that document as second argument in method importStyles().

Regards,
Uwe

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