Selecting an unanchored frame
Beackground
I have a few old documents (~150) that are having issues. When opening these documents one graphic file cannot be found. I know this file was not checked into our source control system, therefore it's missing.
I can see the name of the missing file, for the moment I skip the dialog and continue.
I don't have the file (since it was not checked in) so I want to delete it from the document and insert a new one.
If I run a LOR/Imported Graphics I see file is located on page 42. If I navigate to that page I don't see the expected gray box to indicate the missing file.
I run the script below and I get that the file is located in an unanchored frame, that I cannot see.
Question:
Is there a way to select either the graphic or the unanchored frame in order to delete it? Thanks for any ideas...
var oDoc, oGraphic, oFrame;
oDoc = app.ActiveDoc;
oGraphic = oDoc.FirstGraphicInDoc;
if(oGraphic.ObjectValid()){
//good to go
while (oGraphic.ObjectValid()) {
//
if (oGraphic.type == Constants.FO_Inset){
oFrame = oGraphic.FrameParent;
alert(oGraphic.InsetFile + "\n" + oFrame.constructor.name);
}
oGraphic = oGraphic.NextGraphicInDoc;
}
}