wayneas
asked on
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.
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
ASKER
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
Set myViewer = Me.MiDocView0
make sure the name of the control in the form is miDocView0