Copy link to clipboard
Copied
Would anyone know an easy way to access Object Export Options found in the Object menu of InDesign using a script?
More specifically, we currently have a script with a dialogue that adds alt text to images in a document and has other features that are almost identical to the InDesign Object Export Options feature, but with slight differences. We are trying to synchronize so that when a user adds an alt text thru our dialogue using our script, that the alt text will be changed automaticly specifically under Custom heading in the Object Export Options.
I have found a similar example, at http://forums.adobe.com/message/5688491, but not quite what I'm looking for.
Any ideas?
Hi Andrew,
Do you need a script that will apply Alt Text as Custom type in Object Export Options for images in a document. Please find below script which does same thing:
-----------------------------------------------------------------------------------------------------------
myGraphics = app.activeDocument.allGraphics;
myTotalGraphics = myGraphics.length;
for(var i=0; i<myTotalGraphics; i++)
{
myGraphics.parent.objectExportOptions.altTextSourceType = SourceType.SOURCE_CUSTOM;
...
Copy link to clipboard
Copied
Hi Andrew,
Do you need a script that will apply Alt Text as Custom type in Object Export Options for images in a document. Please find below script which does same thing:
-----------------------------------------------------------------------------------------------------------
myGraphics = app.activeDocument.allGraphics;
myTotalGraphics = myGraphics.length;
for(var i=0; i<myTotalGraphics; i++)
{
myGraphics.parent.objectExportOptions.altTextSourceType = SourceType.SOURCE_CUSTOM;
myGraphics.parent.objectExportOptions.customAltText = "Graphic Number : " + i;
}
-----------------------------------------------------------------------------------------------------------
Thanks
-Anshul
Copy link to clipboard
Copied
Thanks for the help Anshul. Yes this worked. Slight modifications to this code, but I was able to achieved the desired behaviour.
Thanks,
Andrew
Copy link to clipboard
Copied
@AnshulJain19 In my case I want to give custom alt text from the caption which presents in the InDesign file.
every image has a different caption.
Can you help me with this?