Hi, here is how you can do it for a single file. It's a little more complicated for a whole book... if you don't have that many chapters, it might be quicker just to run the script on each file manually. Hope this helps. -Russ
function graphicsGifToPng()
{
var counter = 0;
var graphic = app.ActiveDoc.FirstGraphicInDoc;
while(graphic.ObjectValid())
{
if(graphic.constructor.name == "Inset" &&
graphic.InsetFile != "" &&
graphic.InsetFile.indexOf(".gif") > 0)
{
var path = graphic.InsetFile;
path = path.replace(".gif", ".png");
graphic.InsetFile = path;
counter++;
}
graphic = graphic.NextGraphicInDoc;
}
alert("Script complete. " + counter + " graphic(s) adjusted.");
}