We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now


displaying a document in a textbox

vjnwarp asked
Medium Priority
Last Modified: 2010-07-27
How to display a saved document inside a textbox?
I would like to display a document file created with Microsoft Word.

Watch Question

what kind of document is that ?
a word document, a text file ?????????????


Edited text of question

Unless you learn how Word stores its documents, you won't be able to show a Word document in a textbox.  You can, however, insert a Word object into your project, and use that to display the document through OLE.


Thanks dirtdart. But is there a some way to solve my problem?

Well, like I said above, if you just want to display the Word document, then you can insert the document itself into the project using OLE.  Go to Project | Components and when the dialog box appears, scroll through the list of insertable objects.  You should find Word Document somewhere in that list.  Keep in mind, however, that Office components are not redistributable.  If you use an Office component in your project, you must make sure that all target machines have Office installed on them or the project will fail to run.
I think vjnwarp wants to display a word file at run-time, don't think it's possible for a word document, unless it's ASCII text formatted.

It's possible.  You would just have to add an OLE Container object to your form at design time.  Then, you could insert any OLE compliant document (Word, Excel, etc) into it by setting the correct proeprties.  Unfortunatly, I'm not experienced enough with the OLE Container to tell you specifically how to use it.  Never needed it myself.

Maybe you can use the wordviewer from


to view the word document embedded in a vb5 app?



thanks dirtdart i've accepted your answer. And you taught me how the WORD stores their documents. So i've use a richtextbox and
translate my WORD document into an RTF format. Thanks again.

Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.