Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Location
    London
    Posts
    327

    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.

  2. #2
    Join Date
    Oct 2003
    Location
    London
    Posts
    327
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •