People help me

Discussion in 'Classic ASP' started by Bruce, Sep 14, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Bruce

    Bruce DiscountASP.NET Staff

    The object you are trying to create is Word component. MS Office is not installed on the server and thus this won't work.

    OWC11 (office web component) is installed on the server but not MS Office.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  2. I have an ASP script that generates a Word document, on my computer on ISS it works perfectly, but when I set it on server, it fails.


    On server it gives error:


    Server object error 'ASP 0177 : 800401f3'


    Server.CreateObject Failed


    /test/admin/orders/print.asp, line 205


    800401f3


    The script is:


    Sub Print()


    <%


    Set WordApp = Server.CreateObject("Word.Application")


    Set Word = Server.CreateObject("Word.Document")





    WordApp.Application.Visible = False


    Word.Application.Visible = False





    WordApp.Documents.Open Server.MapPath("docs/template.dot")





    WordApp.Selection.WholeStory


    WordApp.Selection.copy





    With Word.PageSetup


    .Orientation = wdOrientPortrait


    .TopMargin = 2


    .BottomMargin = 0


    .LeftMargin = 0


    .RightMargin = 0


    .VerticalAlignment = wdAlignVerticalTop


    End With





    Word.Content.Paste





    With Word


    .Bookmarks("Name").Range.InsertBefore(strName)


    .Bookmarks("Organization").Range.InsertBefore(" ")


    .Bookmarks("Address").Range.InsertBefore(strAddress)


    .Bookmarks("ZIP").Range.InsertBefore(strState &amp; " " &amp; strZIP)


    .Bookmarks("City").Range.InsertBefore(strCity)


    .Bookmarks("Country").Range.InsertBefore(strCountry)


    .Bookmarks("Pachete").Range.InsertBefore(NumPack)


    End With





    Word.SaveAs Server.MapPath("docs/order_no_" &amp; strOrderNo &amp; "_" &amp; i-1 &amp; ".doc")


    'Word.PrintOut





    WordApp.Quit


    Set WordApp = Nothing


    Set Word = Nothing


    Response.Write("FILE:</b> order_no_" &amp; strOrderNo &amp; "_" &amp; i-1 &amp; ".doc - Finished at " &amp; now() &amp; "")


    End Sub


    %>


    Please help me to solve this error.


    Thank you
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page