Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2562

Getting RANDOM errors while loading [Microsoft.Office.Interop.Word.WdSaveFormat].

$
0
0

Hi, I'm trying to convert a .doc to HTML, and for that I do

$saveFormat = [Enum]::Parse([Microsoft.Office.Interop.Word.WdSaveFormat], "wdFormatFilteredHTML");

at some point in the script.

When using Powergui I get error

Unable to find type [Microsoft.Office.Interop.Word.WdSaveFormat]: make sure that the assembly containing this type is l oaded.

But only SOMETIMES!!!

When I run the script in the console (in STA mode) I ALWAYS get the error.

I was told to install this: Office 2003 Update: Redistributable Primary Interop Assemblies athttp://support.microsoft.com/kb/897646,

but it doesn't make sense as it SOMETIMES work...

Plus I don't have admin rights on the machine I want to run the script from..

Any pointers appreciated.

Thanks,

 

Clovis


Viewing all articles
Browse latest Browse all 2562

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>