Insert Image Into Word Document
I have a word document that's a template for printing labels. I'm trying to insert pre-generated labels (JPGS) into the Word document for printing but can't seem to get it right. When I do this:
<cfimage action = "convert" destination = "c:\inetpub\wwwroot\admin\labels\thumbs\#filename#\labelcropped.jpg" source = "#lblImage#" overwrite="true">
<cffile action="read" file="C:\Inetpub\wwwroot\admin\labels\template.doc" variable="docTemplate">
<cfset docTemplate = ReplaceNoCase(docTemplate, "aa", lblImage, "ALL")>
<cffile action="write" output="#docTemplate#" file = "c:\inetpub\wwwroot\admin\labels\thumbs\#filename#\#filename#.doc">
The word document ends up corrupt and can't be opened by Word. How can I insert images into a word document? I have "aa" placeholders that I want to replace with the images in question.
