Reputation: 69
So I am interested in Microsoft.Office.Interop.Word Namespace, cause in powershell we can read doc file via COM interface but I have a difficult task that needs doing without install Microsoft office. Well how can I read doc file with Microsoft.Office.Interop.Word.dll?
[string]$assemblyPath = '.....\Microsoft.Office.Interop.Word.dll'
# Load assembly and suppress output
[void]([System.Reflection.Assembly]::LoadFrom($assemblyPath))
[System.Reflection.Assembly]::LoadFrom($assemblyPath)
Upvotes: 1
Views: 1238
Reputation: 72640
You can use Microsoft Word COM, only if Word is installed on the computer.
You can consider using DocumentFormat.OpenXml Nuget Package
Upvotes: 1