none
(MODI) microsoft office document imaging Excel 2016 VBA RRS feed

  • Question

  • I am using Excel 2016 VBA.
    I successfully installed MODI per Method 2 using SharePoint Designer 2007:
    https://support.microsoft.com/en-us/help/982760/install-modi-for-use-with-microsoft-office-2010
    Then, I do a "Windows Update" and installed all necessary updates and restart the PC.
    Then the library "Microsoft Document Office Imaging 12 Type Library" appears in VBA editor at Tools>Reference, indicating that MODI is properly installed.
    I select that library in VBA editor.  Then I paste the VBA code from here into VBA editor:
    https://msdn.microsoft.com/en-us/library/office/aa202819(v=office.11).aspx

    Sub TestOCR()
      Dim miDoc As MODI.Document
      Set miDoc = New MODI.Document
      miDoc.Create "C:\document1.tif"  
      Screen.MousePointer = vbHourglass
      miDoc.OCR
      Screen.MousePointer = vbDefault  
      Set miDoc = Nothing
    End Sub

    I run the code and it gives error of "ActiveX component can't create object" at the line for "Set miDoc = New MODI.Document".
    What is fix for this?

    Monday, April 2, 2018 12:05 AM

All replies

  • Hi,

    I notice the issue is related to the Macro codes. To get more suggestion, I would move the thread to Excel for developers forum for more help. 

    Thanks for your understanding.


    Best Regards,
    Winnie Liang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Monday, April 2, 2018 7:12 AM
  • Hello kkaax,

    What do you want to do? MODI is not a part of Excel 2016, it has been removed from Office since Office 2010.

    There is no evidence that MODI is still compatible with Office 2016. In fact, it caused Excel/Access 2016 crashed during my test.

    I would suggest you look for some other solutions for your need.

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, April 3, 2018 6:30 AM