If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > ASP Response Word Document

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Oct 2003
Location: London
Posts: 323
ASP Response Word Document

Hello All,

I'm currently modifying our ASP payslip page to generate a downloadable payslip rather than just an onscreen view of it. Ideally I'd like it in pdf but seem to be having trouble with that but for the moment I'm working on a word version.

The problem is that whilst this opens/downloads, MSWord always opens up in WebContent View rather than print layout.

The odd thing is that whilst I was updating this script and getting error messages, the word document opened the way I wanted it. Does anyone have any thoughts as to how I can get around this?

I have response buffer and flush set else where but the main document bits are;

Code:
<%
Response.ContentType = "application/vnd.ms-word"
Response.AddHeader "content-disposition", "inline; filename = ASP_Word_Doc.doc"
%>
Thank you.
Reply With Quote
  #2 (permalink)  
Old
Registered User
 
Join Date: Oct 2003
Location: London
Posts: 323
I'm sorry. Could you ignore this. I've managed to solve it by ripping apart some bits I found on the net...

Open MS Word documents in Print Layout View

I used the post with the notepad attachment.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On