VB Code:
Option Explicit
Private Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal _
wParam As Long, lParam As Long) As Long
Private Const EM_LINESCROLL = &HB6
Private Const EM_GETFIRSTVISIBLELINE = &HCE
Private Sub Command1_Click()
Dim lng1stVisible As Long
Dim lngLineWithWord As Long
With RichTextBox1
.Find "the word you want"
' Get the line number that contains the word
lngLineWithWord = .GetLineFromChar(.SelStart)
' Get the line number of the 1st visible line
lng1stVisible = SendMessageLong(.hwnd, EM_GETFIRSTVISIBLELINE, 0&, 0&)
' Scroll
SendMessageLong .hwnd, EM_LINESCROLL, 0, ByVal lngLineWithWord - lng1stVisible
End With
End Sub