• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Cold Fusion export to Word Document

New Here ,
Mar 21, 2007 Mar 21, 2007

Copy link to clipboard

Copied

I have a Coldfusion Intranet application which builds an html file which then gets exported to the local drive and then named with a doc extension. Then the document is read in Microsoft Word. The problem is that I want to have headers and footers put on the page along with our logo and page numbers. I would like to have the Cold fusion code do to it for me while it is still in HTML format.

Some possible solution which I did not think were good follow:

Create a dot file with headers, footers, page numbers and log in word and then copy and paste the HTML file into the dot file and save as doc.

Use letter head paper.

Create a web service which reads the HTML page and dynamically places the header and footers on the page as it is being
read before it is written. (I think the possible solution is too complicated).

Coldfusion 7 support writing headers and footers to PDF files but I need it in a Word format.

Thanks for your help
Ray
TOPICS
Advanced techniques

Views

3.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 21, 2007 Mar 21, 2007

Copy link to clipboard

Copied

I am not sure about the options that you have given are feasible. I know coldfusion creates word files but not like the way PDF is built. However I do remember searching the old macromedia or allaire site for a custom tag that would build a word document with headers and footers and found one. But I do have an simple option, which you can give it a try.

Create a word document template with what ever header, footer, images etc. and merge it with the data you want to present. It will produce a new word document what you are looking for. It's the Mail Merge (Word.MailMerge) feature of Microsoft word that can be used.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 21, 2007 Mar 21, 2007

Copy link to clipboard

Copied

make a mock-up of the file in MS Word. Save it as a Web Page (NOT Web
Page, Filtered, if you a given that option). Open the saved file in an
html editor and check all the (rediculous) code MS Word puts in there.
If you had headers/footers, you will notice they are saved as a separate
.htm file called header.htm in a folder called [your word doc
name]_files. open that one in an html editor, too, and check the code.
you will basically have to output your html formatted like that so that
when you save the file with a .doc extension MS Word will pick us your
content and headers/footers.
Note: when file is opened, MS Word will ask if you want to convert it
from HTML format, even if the file has a .doc extension.

i have never actually tried this with Word, but it works with Excel...
--

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 25, 2007 Jun 25, 2007

Copy link to clipboard

Copied

LATEST
Here is an article on IRT. It may be of help.

http://www.irt.org/articles/js154/index.htm

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation