Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word Object on Advance Server

Status
Not open for further replies.

fawadzq

Programmer
Jun 13, 2001
1
EU
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(&quot;Word.Application&quot;)

With objWordDoc
.Documents.Add '<<<<THIS IS LINE # 9<<<<
.Selection.TypeText &quot;test document&quot;

.ActiveDocument.SaveAs server.MapPath(&quot;..\Reports\Test.doc&quot;) , 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,

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top