oApp=CREATEOBJECT("wangimage.application")On the next line I got the same error 87 until I tried without passing the 1 as a parameter:
oImg=oApp.CreateImageViewerObject()That may just be a difference in the version I have, but you might try it without the parameter to see if it gives you any joy. It worked for me, and allowed me to successfully
oImg.open("c:\file.bmp")When you say it works fine in VB, do you mean on the same computer that it fails in VFP, or on different computers?