Solved

displaying a document in a textbox

Posted on 1998-06-30
10
192 Views
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.

0
Comment
Question by:vjnwarp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 2

Expert Comment

by:seahpc
ID: 1464574
what kind of document is that ?
a word document, a text file ?????????????
0
 

Author Comment

by:vjnwarp
ID: 1464575
Edited text of question
0
 
LVL 5

Expert Comment

by:dirtdart
ID: 1464576
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.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:vjnwarp
ID: 1464577
Thanks dirtdart. But is there a some way to solve my problem?


0
 
LVL 5

Expert Comment

by:dirtdart
ID: 1464578
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.
0
 

Expert Comment

by:platiumstar
ID: 1464579
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.
0
 
LVL 5

Expert Comment

by:dirtdart
ID: 1464580
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.
0
 
LVL 2

Expert Comment

by:mtoft
ID: 1464581
Maybe you can use the wordviewer from

http://www.microsoft.com/word/internet/viewer/viewer97/wd97vwr32.exe

to view the word document embedded in a vb5 app?

/mtoft

0
 

Author Comment

by:vjnwarp
ID: 1464582
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.

0
 
LVL 5

Accepted Solution

by:
dirtdart earned 50 total points
ID: 1464583
Glad I could help.

0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

695 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