Ok, well I'm getting closer. the following works, sorta! I still can't get control back after running it!
(vla-SendCommand nf1
(strcat
"_MAPIINSERT " "D:/Temp/images/C2002271825.tif" " N" " "
)
)
This command must work differently in 2005 from what I have, 2002, since I can't get the line you use to work at all. It just goes straight to a dialogue box, no command line interface. Since it doesn't appear that you are doing anything with the image, other than loading it, why not add it with ActiveX and do away with the command?
This works in the current document, but it would be easy (in a MDI environment) to use a different open drawing. You could also use ObjectDBX to eliminate the need to open the drawings in the editor, which would allow you to run it in SDI.
(setq fname "C:/Documents and Settings/Master/My Documents/My Pictures/menu.jpg")
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(setq pspace (vla-get-paperspace doc))
(vlax-invoke pspace "addraster" fname '(0.0 0.0 0.0) 1 0)
This inserts an image at 0,0,0 with a scale of 1 and 0 degrees rotation.
HTH,
Jeff