Display Word document on a Windows form

Posted on 2011-10-03
Last Modified: 2012-05-12
Is there a way to display a word document on a windows form and make it uneditable?

I am using Visual Studio 2008
Question by:YZlat
    LVL 13

    Expert Comment

    by:Naman Goel
    LVL 35

    Author Comment

    it's an old link and the link on that forum is broken
    LVL 18

    Expert Comment

    by:Anil Golamari
    LVL 40

    Accepted Solution

    Not directly, there is now way that I know to load a .doc or .docx in .NET.

    There used to be an OLEControl in VB6 that could do that, but even there, it was not always working well. It seems that they never were able to do one in .NET. COM (on which Word is based), is too different from .NET.

    However, you could write code to save the document as .rtf and reload the generated .rtf into a RichTextBox control. You need to have a copy of Word installed on the computer however to do so.

    Expect to lose a few things in the formatting however, specially if you work with .docx files, because .rtf cannot display everything that a Word document can at a high level. As an exempla, things such as diagonals in table cells do not translate to .rtf files.
    LVL 35

    Author Closing Comment

    I've decided to take a different route but your suggestion was the best answer I got

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (…
    More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now