how do I view a Tiff in Microsoft access 2003 form using MODI VBA

Hi, I am trying to display a tiff in an access 2003 form on load.

The tiff is local (on the C drive) and I have the reference lib. required.
I am trying to display the image in a Microsoft Office Document Imaging Viewer Control object.
(ActiveX object).

Here is my code that gives an error at the "attach document to viewer" step:

Private Sub Form_Load()
 Dim miDoc As MODI.Document
 Set miDoc = New MODI.Document
 Set myViewer = New MODI.MiDocView
 
'open existing document
   miDoc.Create "C:\act\Scan25(14).tif"
   
'assign activeX control to object
 Set myViewer = MiDocView0
 
'attach document to viewer (error at this point)
 myViewer.Document = miDoc
 
   Set myViewer = Nothing
   Set miDoc = Nothing
End Sub

The document processing (conversion to bitmap, gif works).
I am not processing the document images just want to view the tiff.

I am using a windows 7 64bit  OS. full updated. 8 gig Ram quad core Dell

my previous office 2000 form worked by changing the source of the pic object but i believe this method is not supported in office 2003 due to Microsoft security issue with tiffs.
Any help would be much appreciated.

Private Sub Form_Load()
 Dim miDoc As MODI.Document
 Set miDoc = New MODI.Document
 Set myViewer = New MODI.MiDocView
 
'open existing document
   miDoc.Create "C:\act\Scan25(14).tif"
   
'assign activeX control to object
 Set myViewer = MiDocView0
 
'attach document to viewer
 myViewer.Document = miDoc
  
   Set myViewer = Nothing
   Set miDoc = Nothing
End Sub

Open in new window

wayneasAsked:
Who is Participating?
 
GRayLCommented:
I'm running Windows XP Pro and upon reviewing the documentation of MODI at:

http://msdn.microsoft.com/en-us/library/aa167614(v=office.11).aspx

Here's what I found.  The last sentence is a killer.

Important  The MODI programmability features described in this document are available only in Microsoft Office Document Imaging 2003. The Microsoft Office XP version of document imaging does not include a programmable object model.  How about you?
0
 
GRayLCommented:
Change line 10 to:

Set myViewer = Me.MiDocView0

make sure the name of the control in the form is miDocView0
0
 
wayneasAuthor Commented:
I have  done as you suggested and I still get an error at the same point.
 
the object has the correct name and with the addition of Me. i still get a

run time error 438
Object doesn't support this property or method.

Am I using the correct AxtiveX object ?
Microsoft Office Document Imaging Viewer Control

Should the code be in a modual it is currently in the form.

thanks for the feed back.

0
 
Patrick MatthewsCommented:
This question has been classified as abandoned and is being closed as part of the Cleanup Program.  See my comment at the end of the question for more details.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.