Export-OpenXmlToHtml cmdlet

Aug 19, 2008 at 7:32 PM
Hi,

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.
Developer
Aug 20, 2008 at 3:58 AM
Hi!

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 2:37 PM
Edited Aug 21, 2008 at 1:23 PM
Hi,

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'
Coordinator
Nov 9, 2008 at 6: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.