Am setting up a preview window for a client's mailDownLoad directory--so can see actual items, not just a list. Using CFMX
Am accessing preview template via a form select which shows all files in directory--sent as "Attach". On preview page, determine type of file by parsing the extension, as: then use the attach's extension to get the type for cfcontent <CFSet theFile = Attach> <CFSet ext = LCase(ListLast(Attach,"."))> <CFSwitch expression="#Variables.ext#"> <cfcase value="doc"> <CFSet type = "application/msword"> </cfcase> <CFCase value="xls"> <CFSet type="application/msexcel"> </CFCase> <cfcase value="pdf"> <CFSet type="application/pdf"> </cfcase> <CFCase value="html,htm"> <CFSet type="text/html"> </CFCase> <CFCase value="txt"> <CFSet type="text/html"> </CFCase> </CFSwitch> <CFSet Folder = Request.BasicPath & "MailDownLoads\"> <CFSet FetchFile = Folder & theFile> then for output: <cfcontent file="#Variables.FetchFile#" type="#Variables.Type#"> all seems to work fine for pdf and txt. For doc, get message that "proper input not received" for xls, get IE prompt to either download or open file. If choose open, opens it in Dreamweaver. I've never used CFContent before, so I assume I'm using it incorrectly, but don't know where as the pdf and txt work fine. Appreciate any guidance. Thanks Keith Dodd E. Keith Dodd Wings of Eagles Services [EMAIL PROTECTED] - [This E-mail scanned for viruses by declude AntiVirus Software] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm