Hi everyone. I have a form in my Access 2007 database with a Microsoft Office Document Imaging Viewer Control 12.0 object on it. The object is named "GRAPHIC_md v". When the form opens I want to take the path and filename information passed to the form (via the form's opening arguements) and display the file in the MODI Viewer Control object. I'm using the following code to do this:
All of the sample code I've seen uses this simple approach to displaying a image file in a MODI Viewer Control. My problem is the line:
When the program execution gets to this line I get an "access is denied" error. Anyone know what this is about?
I've tested the path and filename being passed to the form and they are correct (i.e. it points to a valid TIF file that I can open with the MODI program that comes with Office 2007).
Any thoughts are greately appreciated.
Regards,
sphinney
Code:
Private Sub Form_Open(Cancel As Integer)
Dim miDOC As MODI.Document
Dim miDOC_VIEW As MODI.MiDocView
'Set a reference to the MDV object on the form
Set miDOC_VIEW = GRAPHIC_mdv.Object
'Set a reference to a new MODI document object
Set miDOC = New MODI.Document
'Open the file in the MODI document object
miDOC.Create Me.OpenArgs
'Associate the MODI document to the MODI viewer control
miDOC_VIEW.Document = DOC
End Sub
Code:
miDOC.Create Me.OpenArgs
I've tested the path and filename being passed to the form and they are correct (i.e. it points to a valid TIF file that I can open with the MODI program that comes with Office 2007).
Any thoughts are greately appreciated.
Regards,
sphinney
Comment