Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 147
  • Last Modified:

Viewing a word97 doc

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
mlentini
Asked:
mlentini
1 Solution
 
vinoopaulsCommented:
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
 
mlentiniAuthor Commented:
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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now