Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cfcontent to microsoft word with image 1

Status
Not open for further replies.

peterswan

Programmer
Sep 25, 2002
263
US
Hello,

I'm trying to add send some HTML content to a word document from a mouseclick on a webpage. The HTML loads into the word doc fine, but the images won't show up.

My code looks like this:

<cfcontent type="application/msword" />
<cfheader name="Content-Disposition" value="Attachment; filename=ccbagenda.doc">
<cfoutput>#ccbagenda#</cfoutput>

Does anyone know how to get the image to display?

Thanks,

Peter [smile]
 
Hi Falcon's eye,

Would I add another cfcontent tag, such as:

<cfcontent type="image/jpeg" deletefile="yes" file="image_name.jpg">

Thanks,

Peter [smile]
 
If the image is available publicly, try replacing the SRC attribute with a fully-qualified URL before rendering the results.

Phil Hegedusich
Senior Programmer/Analyst
IIMAK
-----------
Eschewing obfuscation diurnally.
 
I guess my real question is: Is the image available to the recipient? If it isn't, you'll have to convert the document to a full-blown Word doc, or investigate the method that Word uses to publish docs as HTML and mimic that method. It usually involves including supporting images in a subfolder. I think this is what Falconseye was alluding to.

HTH,

Phil Hegedusich
Senior Programmer/Analyst
IIMAK
-----------
Eschewing obfuscation diurnally.
 
This issue has been solved. It turns out we had installed WSSO (Web Single Sign On) which sends the user back to the login screen when trying to access any folder on our server. What we'll have to do is create some sort of common area underneath the same root and store the images there, or make them publicly available.

Thanks for everyone's help,

Peter [smile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top