View Single Post
 
Old 05-16-2011, 02:21 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2007
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi b0x4it,

I've been offline for a few hours - sleeping! We don't all live in your time zone.

You can manipulate the numbers in an equation as a group with code like:
Code:
Sub Demo()
Dim MathObj As Object
For Each MathObj In ActiveDocument.OMaths
  With MathObj
    .ConvertToNormalText
    With .Range.Find
      .ClearFormatting
      .Replacement.ClearFormatting
      .Text = "[0-9]"
      .Replacement.Text = "^&"
      .Replacement.Font.Italic = True
      .Forward = True
      .Wrap = wdFindContinue
      .Format = True
      .MatchCase = False
      .MatchWholeWord = False
      .MatchAllWordForms = False
      .MatchSoundsLike = False
      .MatchWildcards = True
      .Execute Replace:=wdReplaceAll
    End With
  End With
Next
End Sub
Basically, this is just a wildcard Find/Replace on the oMath ranges
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote