Solved

Viewing a word97 doc

Posted on 1998-09-18
2
137 Views
Last Modified: 2010-04-30
I have an application where I need to view word a document that could be several pages long. While viewing I need to use other controls at any time. I was using an OLE container, but when I move focus from the container to another control, it will de-activate and default back to the first page of the document. The user will then have to double click to activate and find the page he was on. These word documents can have tables, pictures, etc. in them, so rich text box will not work. Is there another control that will do this job and how is it used.
0
Comment
Question by:mlentini
2 Comments
 

Accepted Solution

by:
vinoopauls earned 200 total points
ID: 1435582
Try using this piece of code:

Include the Word 8.0 lbbrary in your application from the references

Option Explicit
Dim wrd As Word.Application
Dim doc As Word.Documents
Private Sub Form_Load()
    Set wrd = New Word.Application
    Set doc = wrd.Documents
    doc.Open ("C:\windows\script.doc")
     wrd.WindowState = wdWindowStateMaximize
     wrd.Visible = True
     wrd.Activate
End Sub

Using this and other properties one can control all aspects of word


0
 

Author Comment

by:mlentini
ID: 1435583
This will work but I need to make the word menu bar and the tool bar invisible form VB. The user must not have editing contol word document.    Thanks Mike
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…

778 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