irneb,
It seems to work (manually anyway) to just "ctrl+x" when the image is visable on the screen without having to actually select the image. Then a simple "Ctrl+V" or pasteclip command in ACAD to embed the OLE object into the drawing. So it seems what I need now is a way to trigger the "Ctrl+X" while another window is active (not the ACAD window).
Bruce
The Ctrl+V is not the issue - you can much more reliably just use the pasteclip command instead.
The issue is that you'd need to open the file in whatever other program is set to open them. On a clean install of Windows, this is usually Paint for stuff like BMP, JPG, etc. In some cases Paint does not open PNG's. But if the user ever installed a different program (e.g. PhotoShop / Gimp / AseeDsee / etc.) chances are that that would become the default program. Some of these work in a different way than Paint does, e.g. PhotoShop / Gimp would require that you first select the entire image (Ctrl+A) then do the Copy (note Ctrl+C not X as that would "delete the image to the clipboard"). So as long as you can ensure that Paint will always be used, then this issue can be resolved.
Now what about the versions of Paint. E.g. the one in XP is a lot different from the one in W7 - even just considering menu/ribbon. So some shortcut keys might even differ there - i.e. how do you open a file using only keystrokes in the one and how do you do it in the other?
Your next major problem is the asynchronous nature of ActiveX. So you start Paint, how long does it take to open? Then how long does it take to open the PNG file? Only after both these have completed can you send the Ctrl+C, otherwise the sendkey function simply sends it to whatever other window currently has focus. So now you need to add some sort of wait to allow for paint to load and open the file before you can copy, the larger the file the longer the needed wait may be, but also depending on the PC's performance (e.g. slow HDD / lots of other programs in RAM making for lots of virtual RAM swaps / etc.).
That is why I'm suggesting finding a way to link to the "Paint" program as if it is a COM/ActiveX server. That way you can call it syncronously, and also not need to worry about the UI or even if it is the default image editor. Unfortunately after some googling I don't seem to find the COM documentation for Paint. So I can't just now give you a sample.
The only other alternative (which would work and not need any external program) would be to attach the image into the DWG instead. That can be done through ImageAttach command very easily through lisp.