> Or opening files this way is not possible in the GoFileFormat() handler, may be because it is already trying to open a new type of file?
I think this is probably the reason it is crashing.
> If that is the case, how should the code be modified?
You could use a timer. In your GoFileFormat() handler store the filename and then create a timer with a zero timeout.
// Store filename etc
In your GoTimer() handler, open the file and remove the timer:
if (message->timer == docOpenTimer)
// Open document code
Thanks for the pointer. For the time being I have bypassed the problem by subscribing to the notification kAIDocumentOpenedNotifier, which is fired after a document is opened. Once my .abc type of file is opened in Illustrator, when a blank document is shown, this handler is called. There I am checking if the currently opened document's filename is with extension ."abc" or not, and if so, I am opening all the EPS files and doing the processing, Files are opened correctly from there. Your solution looks much more elegant and I will try this approach later, but am in desperate hurry now with lot of new problems .