Hi Guys,
Goal: Convert legacy MS Word MODI-Document VBA-application from Office 2007 (on XP), to Office 2010 (on Windows 7, 32-bit).
The VBA code below fails on the OCR method call. The error object message is:
"Automation error. The object invoked has disconnected from its clients. "
MODI was depricated in Office 2010. Microsoft published a solution to include Office 2007 MODI capability within Office 2010. I followed the instructions (for method 3):Dim midoc As MODI.Document Dim FiletoCheck As String Dim DocPages Set midoc = New MODI.Document FiletoCheck = UserForm1.Label1.Caption midoc.Create FiletoCheck DocPages = midoc.Images.Count midoc.Images(0).OCR
support.microsoft.com/kb/982760
So here's the thing, why does the Count method work, but not the OCR method? See below.
DocPages = midoc.Images.Count '<== This works perfectly! midoc.Images(0).OCR '<== This method fails :dunno