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

Convert Word to HTML

New Here ,
May 23, 2006 May 23, 2006

Copy link to clipboard

Copied

We are developing a web-based application that is supposed to allow users to upload a word document; which we want to automatically convert to HTML so that users can access both the word file and the HTML version of the word file. We installed MS Word 2003 on the server and are running CFMX 6.1. We are using the code taken from the Macromedia web site to do this but cannot seem to get it to work. The file is opened on the server but is not saved as HTML. I think that I need to use a different val() since the sample code indicates that val(8) is for word 2000 and val(10) is for word 97. Does anyone know what the val should be for word 2003? Any help would be greatly appreciated.
TOPICS
Advanced techniques

Views

263

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
Advisor ,
May 23, 2006 May 23, 2006

Copy link to clipboard

Copied

For word 2003, use 8 for standard html. Note that this can create multiple files but may be better than val 9 which could embed binaries like pictures in a single html doc.

These values are obtained, for all recent word versions, by exploring "WdSaveFormat" in your visual basic reference.

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
Enthusiast ,
May 23, 2006 May 23, 2006

Copy link to clipboard

Copied

LATEST
Since this article has been published Microsoft has published that they no longer support using MS office for COM automation through server applications. This was published in the release notes for MSOffice 2003 sp2 and other places. They also refer you to the following technote: http://support.microsoft.com/default.aspx?scid=kb;EN-US;257757.

Your issue is that msoffice seems to require you run it as a user on the box. You can run this code, but you must either start coldfusion using commandline - cfusionmx\bin\cfstart. Alternatively set the service to run as a user instead of as localsystem in the services manager. See http://www.adobe.com/go/tn_17279.

The best solution will be to create a new method for this under java. Apache Jakarta POI is a project that duplicates office COM automation using java classes. A POI jar file is included in CFMX7. You will need to download it for cfmx6.x and include it in your class path. You may be able to use nearly identical code using cfobject/java against POI classes.

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