SiteMinder / Webhosting
The Computer Merchant, Ltd
US-MA-North Quincy

Justtechjobs.com Post A Job | Post A Resume

Comments for: yunus20031124

Message # 1029479:
Date: 07/15/05 17:57
By: Object OR .COM
Subject: Anders Nielsen - RE: A better solution...

Excuse!. You can send an example to me related to this email?

aaruiz01@hotmail.com

Armando
Colombia


Subject: A better solution...

After searching google on a way to generate word documents the first i found was this nice article. Several hours and a headache later i decided that using Word.application through COM was not the solution for several reasons:
- winword.exe didn't shut down properly
- difficult to make nice layouts, how to make a bulleted list by example

This made me look for other solutions, ending up with saving my document template as HTML from within Word, and simply just echoing the variables where needed in the HTML, when done streaming it to the browser with header("Content-Type: application/msword");
header('Content-Disposition: attachment; filename="filename.doc"');
Making the document open up Word on the client without any complaints that the contents really are HTML

This is also a good solution for Linux webservers because it doesn't actually require Word on the server like the method with COM does, secondly its very fast, no loading of word application into servers memory etc

Hope this saves anyone the trouble of the Word.application COM object :)

Previous Message | Next Message


Comments:
thank youFra Orv01/27/09 07:39
RE: Inserting Line Breaksbobby.tables10/28/08 07:55
Word on server vs. mime-type tricksSteve09/18/07 10:00
Fatal error: com class not definedHans07/08/07 16:31
how to instantiate COMmienard lumad06/01/07 03:51
write word scriptSandr05/25/07 17:17
Inserting Line BreaksJon01/14/06 08:19
Getting Errorswetha10/28/05 06:13
RE: Pulling out MS Word document propertiesFeierabendbier07/25/05 06:39
create word 2000 filedinanath07/22/05 08:01
Anders Nielsen - RE: A better solution...Object OR .COM07/15/05 17:57
A better solution...Anders Nielsen02/20/05 00:37
RE: No Word on ServerSteven Vanderhoydonks02/08/05 04:32
ideas on parsing Dean01/26/05 12:16
Pulling out MS Word document propertiesRahul01/04/05 19:19
display a word document in html format with pDeepthi Valmikam11/28/04 02:21
generat .doc with tables?anna11/18/04 09:26
RE: Are there other options?Cristian Muraru06/01/04 08:43
RE: Are there other options?tibim03/02/04 15:50
import xhtmlnick02/26/04 17:09
why bother?madis01/04/04 10:40
RE: Are there other options?Mr. Mechano12/30/03 04:51
There is a better RTF-DOC-PDF exampleJon Ritchey12/29/03 14:15
PDF v. WORDsep12/23/03 16:33
RE: Are there other options?Khairul Amri Yunus12/20/03 03:30
RE: Are there other options?Yosh12/13/03 16:05
RE: Word on Server - Not recommended at allAlex12/11/03 16:03
Not as bad as it sounds....andrew taylor12/10/03 06:26
Templates in RTFJeroen Keppens12/09/03 03:42
RE: Are there other options?Eric Esquibel12/08/03 17:42
poor choice..Paul12/06/03 18:46
PDF a better choice for printingDrew F12/05/03 12:05
example using rtf... jon roig12/05/03 11:59
RE: doc poor choice for printingnightowl12/05/03 06:00
RE: Are there other options?nightowl12/05/03 05:58
No Word on ServerMartin Roesch12/04/03 07:38
ex vb programmer?Joe PHP12/03/03 16:28
doc poor choice for printingjohnnyv12/02/03 16:31
Are there other options?Luiz Guilherme12/02/03 14:22
 

If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly.

Add A Comment:

Name:

Email:

Subject:

Message:

To reduce spam posts, messages are now manually approved

You are not [logged in]. That means your account will not get credit for this post.