Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I display a Word Document on my VB Form? 1

Status
Not open for further replies.

Edd

Programmer
Jun 22, 2000
10
0
0
US
I'm trying to open and display an existing Word document without starting the Word application. I simply want to display it as read-only in a window on my form.

I would like to keep the Word formatting.

I have tried reading the file line by line using Input, but since it's not a text file, that doesn't work. I have also tried using the OLE Container control, but it doesn't seem to offer the simple task that I'm looking for.

Any help would be greatly appreciated!
 
You could use the WebBrowser control which comes with VB.

Draw one on a form and then do:

WebBrowser1.Navigate "c:\My documents\My Word doc.doc"

and it will appear as it does in Word. However, you still have the overhead of loading Word although it doesn't actually appear to be running as an application.

- Andy.
 
Thank you. I'll try that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top