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

HTML2Word.cfm custom tag

Explorer ,
Mar 29, 2007 Mar 29, 2007

Copy link to clipboard

Copied

have you used this custom tab? I downloaded this from coldfusion support and wonder it is working on windows 2003. When I downloaded this file, windows 2003 did not even come out and comments on this file said "This tag will only work on WindowsNT/2000". however shouldn't be working on windows 2003 operating system? can you help? (I use CFMX 6.1 update)
TOPICS
Advanced techniques

Views

372

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
Advocate ,
Mar 29, 2007 Mar 29, 2007

Copy link to clipboard

Copied

the only part of the document that might possibly cause a problem is the class name the <Cfobject> tag is using to access MS word: Word.Application. As long as you have word installed on your server and it uses the same class name* it should work fine.

* not exactly sure how to figure out what class name to use, though. Maybe try the following and see if you get an error:


<CFTRY>
<CFOBJECT
ACTION="CONNECT"
CLASS="Word.Application"
NAME="objWord"
TYPE="COM">
<CFCATCH>
<CFTRY>
<CFOBJECT
ACTION="CREATE"
CLASS="Word.Application"
NAME="objWord"
TYPE="COM">

<CFCATCH TYPE="ANY">
<CFABORT SHOWERROR="<FONT COLOR='RED'>Cannot create Word Object<BR>Make sure Word is installed and that ColdFusion has permissions to use the Word COM objects</FONT><BR><B>Error Details:</B> #CFCATCH.MESSAGE#">
</CFCATCH>
</CFTRY>
</CFCATCH>
</CFTRY>

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
Explorer ,
Mar 30, 2007 Mar 30, 2007

Copy link to clipboard

Copied

LATEST
I tried and still got the same error message as below. (btw, the code that you provided is same as that I posted here)
something went wrong with connection to the word object on win2003.
btw, any other custom tag to convert HTML to Word other than I posted? thank you.
--------------------------------------------------------
Error Occurred While Processing Request
<FONT COLOR=&apos;RED&apos;>Error occured while connected to the Word object!</FONT><BR>Error Details: An exception occurred when executing a Com method.


The error occurred in E:\CFusionMX\CustomTags\HTML2Word.cfm: line 149

147 : objWord.Quit();
148 : </CFSCRIPT>
149 : <CFABORT SHOWERROR="<FONT COLOR='RED'>Error occured while connected to the Word object!</FONT><BR>Error Details: #CFCATCH.MESSAGE#">
150 : </CFCATCH>
151 : </CFTRY>

--------------------------------------------------------------------------------

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