HOWTO: Scroll an Embedded Word 6 Document in VB OLE (147804)
The information in this article applies to:
- Microsoft Word 2000
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual Basic Standard Edition for Windows 4.0
- Microsoft Visual Basic Professional Edition for Windows 4.0
- Microsoft Visual Basic Enterprise Edition for Windows 4.0
- Microsoft Word 97 for Windows
This article was previously published under Q147804 SUMMARY
The versions of Microsoft Word listed at the beginning of this article do
not supply scroll bars that allow an activated document embedded in the
Visual Basic OLE container control to be scrolled through. This article
describes how to provide buttons that allow the user to scroll through an
embedded Word document that has been activated for visual editing.
To scroll through the window, you must call a Word Basic method such as
VLine. However, if you call the method from within a scroll-bar event, the
code does not work. The problem is that when the scroll bar receives the
focus, the Word document object in the OLE control is deactivated. If you
try to activate the Word Document object in the scroll-bar event, the
insertion point moves to the beginning of the document, causing you to lose
the current position in the document. This problem happens with any control
that can receive the focus.
Modification Type: | Minor | Last Reviewed: | 3/21/2005 |
---|
Keywords: | kbAutomation kbhowto kbinterop KB147804 |
---|
|