Convert office docs to html with VBScript in ASP.NET RRS feed

  • Question

  • I am trying to convert office documents to html in an ASP.net application.

    I have tried several methods including VBScript, SautinSoft UseOffice and VeryDoc doc2any

    all the methods i suspect use VBScript to open office and perform a save as operation.

    while this method works fine when i run it from command prompt, when it runs from ASP.NET it fails.

    I tried running the application pool with an admin user account - that does not help.

    any thoughts?

    here is the VBscript:

    Dim WordApp
    Set WordApp = CreateObject("Word.Application")
    If WordApp Is Nothing Then
    	MsgBox "Couldn't start Word.", 48, "Application Start Error"
    	WordApp.Documents.Open WScript.Arguments.Item(0)
    	WordApp.ActiveDocument.SaveAs WScript.Arguments.Item(1), 10
    End If
    Set WordApp = Nothing

    Tuesday, July 17, 2012 8:28 AM