Link to home
Start Free TrialLog in
Avatar of jramos74
jramos74

asked on

Opening a Word Document using CFCONTENT

I have created a page (print_me.cfm) with the following line of codes:

<cfheader name="Content-Disposition" value="inline; filename=timeframe.doc" >
<cfcontent type="application/word"> \

<queries>
<table>
  Tables content
</table>

Basically this page will display the query output on a word doc format.  That is not a problem.  The issue I have is when the Word Document opens, it defaults to Web Layout.  Is there a code that I can add on my print_me.cfm page so when the Word Document opens, it opens on a Print Layout?
Avatar of SidFishes
SidFishes
Flag of Canada image

The issue is with word and not cfcontent.

if you do this

<cfheader name="Content-Disposition" value="inline; filename=timeframe.doc" >
<cfcontent type="application/word">
SomeData

it will open in Print Layout

as soon as you add a table, it opens in web view

afaik there is no work around
ASKER CERTIFIED SOLUTION
Avatar of SidFishes
SidFishes
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial