View Single Post
 
Old 11-12-2015, 04:28 AM
gmaxey gmaxey is offline Windows 7 32bit Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,598
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim lngIndex As Long
  Do
    Selection.Style = ActiveDocument.Styles("style 1")
    For lngIndex = 1 To 6
      Selection.MoveRight Unit:=wdCell
      If Left(Selection.Cells(1).Range.Text, Len(Selection.Cells(1).Range.Text) - 2) = "%string" Then Exit Do
    Next lngIndex
  Loop
lbl_Exit:
  Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote