×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

cfcontent to microsoft word with image

cfcontent to microsoft word with image

cfcontent to microsoft word with image

(OP)
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

RE: cfcontent to microsoft word with image

since the word document actually refers to that image, you will need to send those images on to the client's machine as well...


hope it helps...

www.jetansolutions.com

RE: cfcontent to microsoft word with image

(OP)
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

RE: cfcontent to microsoft word with image

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
http://www.iimak.com
-----------
Eschewing obfuscation diurnally.

RE: cfcontent to microsoft word with image

(OP)
Hi Phil,

No, it's not publicly available. This is a company intranet that is SSL secured.

The src attribute in the image tag is qualifed URL path to a file on our server that looks like the following:

"https://servername.com/rootfolder/images/image_name.jpg"

Thanks,

Peter

RE: cfcontent to microsoft word with image

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
http://www.iimak.com
-----------
Eschewing obfuscation diurnally.

RE: cfcontent to microsoft word with image

(OP)
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close