0
[CS2][JS] Map tags to styles
New Here
,
/t5/indesign-discussions/cs2-js-map-tags-to-styles/td-p/1147856
Apr 02, 2008
Apr 02, 2008
Copy link to clipboard
Copied
Hi
I would like to map styles to tags and map tags to styles using a predefined file....
I've tried using ...
var thepath="/Volumes/test/Mapping.indd";
var myImportfile=new File(thepath);
app.activeDocument.xmlImportMaps.add(myImportfile);
app.activeDocument.xmlExportMaps.add(myImportfile);
... but it raises an error... missing parameter...
Does anyone have an idea?
Thanx
Tim
I would like to map styles to tags and map tags to styles using a predefined file....
I've tried using ...
var thepath="/Volumes/test/Mapping.indd";
var myImportfile=new File(thepath);
app.activeDocument.xmlImportMaps.add(myImportfile);
app.activeDocument.xmlExportMaps.add(myImportfile);
... but it raises an error... missing parameter...
Does anyone have an idea?
Thanx
Tim
TOPICS
Scripting
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
/t5/indesign-discussions/cs2-js-map-tags-to-styles/m-p/1147857#M338115
Apr 02, 2008
Apr 02, 2008
Copy link to clipboard
Copied
This and many other things are described in some of Adobe's documentation at http://www.adobe.com/products/indesign/scripting/index.html
Peter
Peter
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
_Tim_Melis_
AUTHOR
New Here
,
/t5/indesign-discussions/cs2-js-map-tags-to-styles/m-p/1147858#M338116
Apr 02, 2008
Apr 02, 2008
Copy link to clipboard
Copied
Hi Peter,
Thanks for the info...
In the syntax reference I found the missing property ... reading the reference I realized that maybee I'm using the wrong object or methode... But I've searched almost an hour for the correct object and methode and I didn't find anyone that can be used to load the Tags To Styles mapping from an other indesign file...
Do you have an idea ?
Thanx
Tim
Thanks for the info...
In the syntax reference I found the missing property ... reading the reference I realized that maybee I'm using the wrong object or methode... But I've searched almost an hour for the correct object and methode and I didn't find anyone that can be used to load the Tags To Styles mapping from an other indesign file...
Do you have an idea ?
Thanx
Tim
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
/t5/indesign-discussions/cs2-js-map-tags-to-styles/m-p/1147859#M338117
Apr 02, 2008
Apr 02, 2008
Copy link to clipboard
Copied
I'm not particularly good at this sort of thing, but the reference says that xmlImportMaps.add() takes two parameters, a markup tag and the mapped style. Take a look at p. 114 of this document:
http://www.adobe.com/products/incopy/scripting/pdfs/InCopy_CS3_Scripting_Guide_JS.pdf
which is for CS3, but what you want to do has not changed much I don't think.
Peter
http://www.adobe.com/products/incopy/scripting/pdfs/InCopy_CS3_Scripting_Guide_JS.pdf
which is for CS3, but what you want to do has not changed much I don't think.
Peter
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
New Here
,
/t5/indesign-discussions/cs2-js-map-tags-to-styles/m-p/1147860#M338118
Jul 22, 2008
Jul 22, 2008
Copy link to clipboard
Copied
The incopy scripting guide pdf doesn't seem to be downloading.
Does anyone have a copy they could post elsewhere?
Does anyone have a copy they could post elsewhere?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Explorer
,
LATEST
/t5/indesign-discussions/cs2-js-map-tags-to-styles/m-p/1147861#M338119
Jul 22, 2008
Jul 22, 2008
Copy link to clipboard
Copied
Hi Eric,
I just checked the link, and it's working fine. Try again?
Also, I'd missed this thread earlier--what Tim is asking about (loading a tag to style mapping from a file) can't be done directly in the user interface (as far as I can tell), so it can't be done directly from scripting. Instead, you'd have to open the file containing the tag to style mapping, then transfer the mapping one import/export map at a time to the target file.
Thanks,
Ole
I just checked the link, and it's working fine. Try again?
Also, I'd missed this thread earlier--what Tim is asking about (loading a tag to style mapping from a file) can't be done directly in the user interface (as far as I can tell), so it can't be done directly from scripting. Instead, you'd have to open the file containing the tag to style mapping, then transfer the mapping one import/export map at a time to the target file.
Thanks,
Ole
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

