プログラマビリティ
出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2021/03/07 02:33 UTC 版)
「Microsoft Office ツール」の記事における「プログラマビリティ」の解説
MODIは、 コンポーネントオブジェクトモデル (COM)を介してdocumentとimage オブジェクトを公開している。OCRエンジンを使用して、スキャン画像をテキストに変換できる。 MODIオブジェクトモデルには、Microsoft Office Document Imaging 11.0タイプライブラリへの参照を使用して、コンポーネントオブジェクトモデル(COM)をサポートする開発ツールからアクセスできます。 MODI Viewerコントロールは、Microsoft Office Document Imaging Viewer Control 11.0または12.0(MDIVWCTL.DLL)をアプリケーションプロジェクトに追加することにより、 ActiveXコントロールをサポートする開発ツールからアクセスできる。MODI関連のコンポーネントは、 C:\Program Files\Common Files\Microsoft Shared\MODIにインストールされている。 Office XPにMODI自体は含まれていたがプログラミングは可能ではなかった。MODIコントロールは、Office 2003で初めて利用可能になった。 Dim inputFile As String = "C:\test\multipage.tif"Dim strRecText As String = "" Dim Doc1 As MODI.Document Doc1 = New MODI.DocumentDoc1.Create(inputFile)Doc1.OCR() ' this will ocr all pages of a multi-page tiff fileDoc1.Save() ' this will save the deskewed reoriented images, and the OCR text, back to the inputFileFor imageCounter As Integer = 0 To (Doc1.Images.Count - 1) ' work your way through each page of results strRecText &= Doc1.Images(imageCounter).Layout.Text ' this puts the ocr results into a stringNextFile.AppendAllText("C:\test\testmodi.txt", strRecText) ' write the OCR file out to diskDoc1.Close() ' clean upDoc1 = Nothing
※この「プログラマビリティ」の解説は、「Microsoft Office ツール」の解説の一部です。
「プログラマビリティ」を含む「Microsoft Office ツール」の記事については、「Microsoft Office ツール」の概要を参照ください。
- プログラマビリティのページへのリンク