myInDesign.ScriptPreferences.UserInteractionLevel = idUserInteractionLevels.idNeverInteract
Set myDocument = myInDesign.Open(FileName)
For nPic = 1 To myDocument.AllGraphics.Count
If myDocument.AllGraphics(nPic).ItemLink.Status <> idLinkStatus.idNormal _
And myDocument.AllGraphics(nPic).ItemLink.Status <> idLinkStatus.idLinkEmbedded Then
Stop ' Здесь будет обработка ошибки
End If
Next nPic
myDocument.Close
myInDesign.ScriptPreferences.UserInteractionLevel = idUserInteractionLevels.idInteractWithAll