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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word File in not Visible in ASP

Status
Not open for further replies.

zainal1

Programmer
Nov 23, 2001
2
BD
Hello all

Can anyone give me a good source of information on creating, Showing the MS word document from ASP.

I have tried - it saved but not visible. I don't know what's wrong.

The Source code is :


<% Dim docname,strtemplate,objdoc,objword

Set objword = CreateObject(&quot;word.application&quot;)

objword.Visible = True
strtemplate = &quot;c:\testsource.doc&quot;
Set objdoc = objword.Documents.add(strtemplate)

docname = &quot;C:\testoutput.doc&quot;
objdoc.SaveAs docname

objword.Documents.Open docname

Set objdoc = Nothing
objword.Application.Quit
Set objword = Nothing
%>


Thanks


Zainal
 
zainal1,

Since you are ASP running code on the server, the string

Set objword = CreateObject(&quot;word.application&quot;)

gets executed on the server, not the client that is displaying the web page. Perhaps that is what you wanted to do, display the contents on the browser?


fengshui_1998
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top