Export-OpenXmlToHtml cmdlet

Aug 19, 2008 at 8:32 PM

I have this error :

PS C:\PS> Export-OpenXmlToHtml -Path 'cyberlex.docx' -HtmlOutputName 'default.html' -OutputPath 'C:\PS' -XslPath 'c:\ps'
Export-OpenXmlToHtml : L'accès au chemin d'accès 'C:\ps' est refusé.
At line:1 char:21
+ Export-OpenXmlToHtml <<<< -Path 'cyberlex.docx' -HtmlOutputName 'default.html' -OutputPath 'C:\PS' -XslPath 'c:\ps'

I really don't know how to make it work.
Aug 20, 2008 at 4:58 AM

You would need to give the full path to the xsl transformation to be applied to the document. Locate the xlst you want to use and give the full path to it.
Aug 20, 2008 at 3:37 PM
Edited Aug 21, 2008 at 2:23 PM

Thank you for the quick reply Roger! I used the binairies from http://staffdotnet.com/services/powertools.html. I still have this error when i'm using full path.

PS C:\> Export-OpenXmlToHtml -Packing -Path 'c:\ps\cyberlex.docx' -HtmlOutputName 'c:\ps\default.html' -OutputPath 'c:\ps\htmlOut' -XslPath 'c:\ps\DocX2Html.xsl'
Export-OpenXmlToHtml : Could not find a part of the path 'C:\ps\htmlOut\'.
At line:1 char:21
+ Export-OpenXmlToHtml  <<<< -Packing -Path 'c:\ps\cyberlex.docx' -HtmlOutputName 'c:\ps\default.html' -OutputPath 'c:\ps\htmlOut' -XslPath 'c:\ps\DocX2Html.xsl'
Nov 9, 2008 at 7:56 PM
Sorry for the slow reply...

The error seems to indicate that the folder "htmlOut" does not exist. The cmdlet will not create a folder if it does not already exist.