p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Basics (http://p2p.wrox.com/forumdisplay.php?f=61)
-   -   use CreateObject("word.application") in ASP (http://p2p.wrox.com/showthread.php?t=23847)

Andraw January 13th, 2005 06:17 PM

use CreateObject("word.application") in ASP
Hi, all,
to use:<%CreateObject("word.application")%>, the server machine must have to install MS word? Because I create a program, I can run it in my local server, but can't run it in our production server. URGENT!!!

mat41 January 13th, 2005 06:44 PM

Are you getting an error? Please describe the behaviours

Wind is your friend

Andraw January 13th, 2005 11:03 PM

Hi, mat41
Yes, I got an error say. I know now. I saw an artical say to create a word.application object, server side machine must install MS word.
Thanks. it is said to create RTF file is much safer and efficient than word file, but the source code is too complex, did you ever do that?


mat41 January 13th, 2005 11:38 PM

RTF, no

I am not so security savvy, we have NA's for hat sort of thing.

One of my favourite sayings come to mind 'buy more hardware' easy to say, as a developer it doesnt come out of my pocket.

Wind is your friend

Andraw January 13th, 2005 11:58 PM

How can I create a report that not saved in server side, but client can save it in the client side. Did you ever use CreateObject("word.application"), we can write data to it, but if you want to display it in screen, you have to save it in the server side, is there some good way?


mat41 January 14th, 2005 12:11 AM

;;;How can I create a report that not saved in server side
To show it we have to save it, I believe saving it on the server is our only option initially.

;;;but client can save it
The client can save it once opened

;;;is there some good way

Wind is your friend

Andraw January 14th, 2005 12:46 AM

thks for your response. But save files in the server will generate many dummy files in server machine. Another thing if one user is displaying the report, at the same time, aonther user try to save or modify the same file, what will happen? if for different user, same ther rpt as different file, will cause many many files in server. any good way?


mat41 January 14th, 2005 01:15 AM

The client saves it to his local machine, not to the server (you need to file upload for this). When you write the server side script to create the file, this is when it gets saved to the server. I thought your question seemed a bit weird, I obviously miss understood what you were asking.

What do you want to do, let people upload document to your site?

Wind is your friend

Andraw January 14th, 2005 02:13 PM

I also think the problem is werid. my boss want me to show it on the screen, and also user can save it on the user machine, at the same time, the file is nt save in the server side.
Now I decide to do like this:
Create a report.doc on the server side, then ask the user to save it, after that delete at once. How can I do that? i have following codes:

  strFileName = "reportWord.doc"
  Response.ContentType = "application/msword"
  Response.AddHeader "Content-isposition", "attachement;filename=""" & strFileName & """"

Suppose there is a dialog box appear to ask user to save it, but nothing happen, can anybody give me the completed code to ask user to save the file? tks


mat41 January 14th, 2005 07:56 PM

Did you have a look at the link I gave you?



;;;can anybody give me the completed code
This place is all about troubleshooting problematic code. All the code is there (in the link - almost cut n paste), on this forum (use the search) and many other places on the net. Have a go, if you get stuck post specific problems. The more specific the quicker you will get a solution.

Wind is your friend

All times are GMT -4. The time now is 04:05 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.