View Single Post
Old 07-31-2019, 06:10 AM
gmaxey gmaxey is offline Windows 10 Office 2016
Word MVP 2003-2009
Join Date: May 2010
Location: Marble, NC
Posts: 1,055
gmaxey has a spectacular aura aboutgmaxey has a spectacular aura about


I'm not a computer scientists, but something like this:

Sub ScratchMacro()
'oRng is a named variable.  I just made it up using o meaning object and Rng meaning range
'Dim declares a named variable and defines the data type in the Word object model.  In this case
'a Word.Range
Dim oRng As Word.Range
  'Use Set to set the range object to a range in the document e.g., the Selection.Range
  Set oRng = Selection.Range
  'Paste is a method of a range object and puts the contents in and expands the range.
  'Select is a method of a range object and selects the defined range.
End Sub
Greg Maxey
Please visit my web site at
Reply With Quote