Copy link to clipboard
Copied
Hi Team,
How to find a paragraph/charcter styles is imported from another template using javascript.
Thanks
1 Correct answer
Just a note:
I watched the value for styleUniqueId in a source document.
Then I loaded all the custom styles from the source to a new document.
All values of styleUniqueId are still intact.
The same if you load a style and overwrite an existing one using all incoming properties.
That will change in the moment when a style is renamed or changed otherwise[*].
Perhaps needless to say that if you rename the style back to its old name the styleUniqueId will not be restored, it will just get anoth
...Copy link to clipboard
Copied
Hi @Balaji Murugesan ,
when you import/place a Word document the styles imported from that document show value true for property imported that comes with character styles and paragraph styles. But maybe this is not the thing you want to know?
Could you tell what you exactly mean with "another template".
Also look into property styleUniqueId for paragraph styles and character styles.
Regards,
Uwe Laubender
( Adobe Community Professional )
Copy link to clipboard
Copied
Probably Balaji means the import also available from the style panel fly-out, that would both modify existing styles and create new ones (as you say one could watch IDs for that).
I think scripting "using javascript" has no notification such as a matching document event, while plug-ins definitely can see all of that "import using javascript", styles getting added and/or modified.
Copy link to clipboard
Copied
Just a note:
I watched the value for styleUniqueId in a source document.
Then I loaded all the custom styles from the source to a new document.
All values of styleUniqueId are still intact.
The same if you load a style and overwrite an existing one using all incoming properties.
That will change in the moment when a style is renamed or changed otherwise[*].
Perhaps needless to say that if you rename the style back to its old name the styleUniqueId will not be restored, it will just get another id for the second change.
Also note that the value for styleUniqueId in the [No Paragraph Style] is always empty.
And that the value for property label of a style will persist if you load a style.
[*] Changing the value for property label will not change the value for styleUniqueId .
Regards,
Uwe Laubender
( Adobe Community Professional )
Copy link to clipboard
Copied
Hi @Laubender and @Dirk Becker, Thanks for your suggestion, feasibility studies will be done based on your suggestions and the status will be updated here as soon as possible.
Thanks
Balaji M

