The following VBA example imports the file
C:\Example.jpg and returns an
ImportFilter object that is used to determine whether the filter has a dialog box. If the filter has a dialog box, that dialog box is displayed; otherwise, the default JPEG settings are applied. The
Finish method is called to finish the import.
Sub Test()
Dim d As Document
Dim s As Shape
Dim i As ImportFilter
Set d = CreateDocument
Set i = d.ActiveLayer.ImportEx("C:\Example.jpg", cdrJPEG)
If i.HasDialog Then
i.ShowDialog
i.Finish
Else
i.Reset
i.Finish
End If
End Sub