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 ?
- Sudha K
Copy link to clipboard
Copied
hi sudha,
uncheck all style first and then select that specific style you want to import in a document.
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??
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);
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??
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);
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
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??
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
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??
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
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?
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.
Copy link to clipboard
Copied
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