Creating Word doc from ASP

C

CJM

Yes I can use Google too... but I haven't found the right article tutorial
yet (though still looking).

I want to create a Word document in ASP, which will be subsequently emailed
to a client, so it needs to look good, and the examples I have found so far
have been too simplistic.

I'm actually looking to be able to create a quotes for customers, so I
imagine someone out there has done something similar. And as you can
imagine, it has to be a fairly professional job.

I'm guessing that the best way to go about this is to use a template
document and to just edit the fields?

Anybody got any examples, pointers, suggestions, code for me to work from?

Thanks

Chris
 
S

Stephanie Stowe

Does it HAVE to be MS Word? If it is a standard form with field data stamped
into it, I would use the PDF format and a product from Appligent called.
FDFMerge.

www.appligent.com

Good luck.

S
 
S

Scott McNair

I want to create a Word document in ASP, which will be subsequently
emailed to a client, so it needs to look good, and the examples I have
found so far have been too simplistic.

At the top of your ASP page:

Response.ContentType = "application/msword"

Then build the page just like you would any ASP file. When you run it,
it will return the contents as a Word doc. If you would like to do the
same for Excel:

Response.ContentType = "application/vnd.ms-excel"

Hope that helps,
Scott
 
N

na

If you have Adobe Pro on your server, would that work the same way to create
a PDF?... just a thought.
 
C

CJM

Scott,

This never occured to me. And I'm guessing I can get a pretty accurate
layout using CM & PT for units...

I'll have a go today, and postback later...

Thanks

Chris
 
C

CJM

Scott,

After some tinkering I realise I still have a bit of a problem.

This solution streams the word doc to the user... I dont want this to
happen - I need the file to be saved to the server.

Is this possible using this technique?

Cheers

Chris
 
S

Scott McNair

na said:
If you have Adobe Pro on your server, would that work the same way to
create a PDF?... just a thought.

Unfortunately, no. PDF is proprietary, and therefore isn't quite so easy
to mimic.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,135
Latest member
VeronaShap
Top