I'm not very clear what you mean by release. Do you mean that the file is being locked, and cannot be used by another process?

I am currently using VB2010 to look at this problem, but I can run up my system with VB6. Meanwhile it might help to understand if you post some of your code, especially the opening code (or design-time settings, if that is what you use)

0

wcoheeAuthor Commented: 2011-05-11

Graham Skan,
Yes, the file is locked and as long as MODI viewer has it I can't do anything with it.

However, I just tried the following code and it worked just fine:

Private Sub ReleaseImage()
Dim myvar As String
Dim strPath As String
Set imgdoc = New MODI.Document
imgdoc.Create ""
Set myviewer = MiDocView0
myviewer.Document = imgdoc
Set myviewer = Nothing
Set midoc = Nothing
End Sub
I was just grabbing at straws when I decided to try and put "" as the parameter for the imgdoc.Create statement and lo and behold it worked. Thanks for your help. I really appreciate it. Sorry to put you to any trouble.