I am trying to create Word doc through ASP. In VB code is working perfectly. But in ASP getting following error:
----
There is insufficient memory. Save the document now.
/SID/contents/test.asp, line 9
---
The Line # 9 is a line where am trying to Add new document in ASP file. Following is the code
<%
Set objWordDoc = Server.CreateObject("Word.Application"
With objWordDoc
.Documents.Add '<<<<THIS IS LINE # 9<<<<
.Selection.TypeText "test document"
.ActiveDocument.SaveAs server.MapPath("..\Reports\Test.doc" , 0
.ActiveDocument.Close
End With
Set objWordDoc = Nothing
%>
Keep in mind I working on Win-2000 Advance Server and this code is working fine for NT 4.0.
I have already ran an ASP file to fix Out of Process component problem and code is creating a Word instance on server. So problem is now to Add Document not in creating Word instance.
Best regards,
----
There is insufficient memory. Save the document now.
/SID/contents/test.asp, line 9
---
The Line # 9 is a line where am trying to Add new document in ASP file. Following is the code
<%
Set objWordDoc = Server.CreateObject("Word.Application"
With objWordDoc
.Documents.Add '<<<<THIS IS LINE # 9<<<<
.Selection.TypeText "test document"
.ActiveDocument.SaveAs server.MapPath("..\Reports\Test.doc" , 0
.ActiveDocument.Close
End With
Set objWordDoc = Nothing
%>
Keep in mind I working on Win-2000 Advance Server and this code is working fine for NT 4.0.
I have already ran an ASP file to fix Out of Process component problem and code is creating a Word instance on server. So problem is now to Add Document not in creating Word instance.
Best regards,