Skip to main content
Balaji Murugesan
Known Participant
July 15, 2022
Answered

How to find a paragraph/character style is imported using javascript?

  • July 15, 2022
  • 2 replies
  • 533 views

Hi Team,
How to find a paragraph/charcter styles is imported from another template using javascript.

 

Thanks

This topic has been closed for replies.
Correct answer Laubender

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 )

 

 

 

2 replies

LaubenderCommunity ExpertCorrect answer
Community Expert
July 26, 2022

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 )

 

 

 

Balaji Murugesan
Known Participant
July 26, 2022

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

Community Expert
July 15, 2022

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 )

Legend
July 23, 2022

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.