Mega Code Archive

 
Categories / VisualBasic Script / Word
 

Define a Range

Sub RangeText()     Dim wdApp As Word.Application     Dim wdDoc As Document     Dim wdRng As Word.Range          Set wdApp = GetObject(, "Word.Application")     Set wdDoc = wdApp.ActiveDocument          Set wdRng = wdDoc.Range(0, 22)     wdRng.Select          Set wdApp = Nothing     Set wdDoc = Nothing     Set wdRng = Nothing End Sub