views:

124

answers:

0

Hello. I am trying to convert .doc files into multiple office types (docx,txt,pdf,odt) from doc. Based on a previous post #35639, I found a sample in the microsoft script library:

With that information and this link to MSDN I found the values for office formats, but my question, is there a value for .odt using the WDSaveFormat value?

I added some code to give a better visual - I tried mode 12 but it failed.

#odt format
echo "Putting out .odt"
$strFile = $objFile.FullName
$strNewFile = $objFile.DirectoryName + "\" `+ $objFile.Name.Split(".")[0] + ".odt"
$objDoc = $objWord.Documents.Open($strFile, $False)
$a = $objDoc.SaveAs([ref] $strNewFile, [ref] 12)
$objDoc.Close()