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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.