exporting word file content to aspx web page

Discussion in 'ASP .Net' started by Franck, Oct 14, 2005.

  1. Franck

    Franck Guest

    Hello,
    I'm trying to diplay the content of a word file on a aspx page
    only the content if possible... not the file

    I tried the folowing but it doesn't work...
    Response.ContentType = "application/ms-word";
    string file ="Annexes.doc";
    Response.WriteFile(file);
    the only documentation I can find is for doing the reverse?
    Are there any tools for doing so?
    thanks for your help.
    Franck, Oct 14, 2005
    #1
    1. Advertising

  2. You have two options I can think of right now.

    1. Use the Word COM objects to pull the content out.
    2. If Word 2000 or greater and saved in non-backward compatible format, pull
    the XML and remove the tags via XSLT. Display the information that is left.

    Number 1 may be easier to get going with, but requires putting Office DLLs
    on your server. It is also slower. It is the only option I know with Word
    Native format.

    Number 2 will take a bit more work, but you might find someone who has an
    XSLT created for this type of work.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    ***************************
    Think Outside the Box!
    ***************************


    "Franck" wrote:

    > Hello,
    > I'm trying to diplay the content of a word file on a aspx page
    > only the content if possible... not the file
    >
    > I tried the folowing but it doesn't work...
    > Response.ContentType = "application/ms-word";
    > string file ="Annexes.doc";
    > Response.WriteFile(file);
    > the only documentation I can find is for doing the reverse?
    > Are there any tools for doing so?
    > thanks for your help.
    >
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN, Oct 14, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Franck
    Replies:
    0
    Views:
    375
    Franck
    Oct 13, 2005
  2. hazz
    Replies:
    6
    Views:
    49,557
    SkyUCHC
    Jun 9, 2010
  3. S_K
    Replies:
    1
    Views:
    390
    IfThenElse
    Oct 2, 2007
  4. Replies:
    1
    Views:
    1,284
  5. Problem in Exporting ASP page in word

    , Jul 19, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    134
Loading...

Share This Page