Hi,
I have been trying to generate a word document from within my ASP
page. When I try to bring up the page and generate a word doc the
following error is generated. Any help is greatly appreciated. My Word
version is Microsoft Word 2002, ( from the HELP---> ABOUT menu).
~~~~~~~~~~~~~~~~~~~~~~CODE SAMPLE~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<%
Sub CreateAppraisalForm(Manager,Email,Appraisee)
Set WordApp = Server.CreateObject("Word.application")
Set WordDoc = WordApp.Documents.Add()
WordApp.Application.Visible = False
Set MyRange1 = WordDoc.Paragraphs.Add.Range
MyRange1.InsertBefore("Appraisal Form")
MyRange1.Style = "Heading 1"
Set MyRange1 = WordDoc.Paragraphs.Add.Range
MyRange1.InsertBefore("Manager: " & Manager & vbcrlf &
"Appraisee: " & Appraisee)
MyRange1.Font.Bold = true
Set MyRange1 = WordDoc.Paragraphs.Add.Range
MyRange1.InsertBefore(vbcrlf & "Please fill in all the required
sections and return to HR via the internal mail system.")
WordDocPath = Server.MapPath("\folder")
WordDoc.SaveAs WordDocPath & "\sample.doc"
WordDoc.Close
WordApp.Quit
Set WordDoc = Nothing
Set WordApp = Nothing
End Sub
call CreateAppraisalForm("Manager","john@mmm.com","Appraisee11")
~~~~~~~~~~~~~~~~~~~~~~~END CODE SAMPLE~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks.
Hamid Djam.
JM Freixes - 25 Oct 2004 10:33 GMT
Try reading the article 288368 and related in the Knowledge Base.
> Hi,
> I have been trying to generate a word document from within my ASP
[quoted text clipped - 40 lines]
>
> Hamid Djam.
Hamid Djam - 25 Oct 2004 23:58 GMT
> Try reading the article 288368 and related in the Knowledge Base.
>
[quoted text clipped - 42 lines]
> >
> > Hamid Djam.
I am not sure which knowledge base you are refereing to.
JosepM - 26 Oct 2004 18:01 GMT
Try http://support.microsoft.com/default.aspx?kbid=288368
> > Try reading the article 288368 and related in the Knowledge Base.
> >
[quoted text clipped - 44 lines]
>
> I am not sure which knowledge base you are refereing to.