Good morning,
I am trying to turn a Word VBA macro into an Applescript.
Here is the VBA code
Sub Macro2()
’
’ Macro2 Macro
’ Macro recorded 2/27/08 by G501
’
Selection.Find.ClearFormatting
Selection.Find.Style = ActiveDocument.Styles( _
“*SE12-callout numbers & letters”)
With Selection.Find
.Text = “^?”
.Replacement.Text = “^&”
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.ClearFormatting
Selection.ClearFormatting
End Sub
I get how to change everything starting with With Selection.Find
I believe that is simply
tell application "Microsoft Word"
tell find object
set content to "^?"
set content of its replacement to "^&"
set forward to true
etc.
end tell
However what I can’t discern or extract from the Word 2004 Applescript Guide is how to write the “Selection.Find.Style = ActiveDocument.Styles(_”*SE12-callout numbers & letters)
I’m trying to select any character with a character style called *SE12-callout numbers & letters applied. Then I want to clear the formatting.
Thanks for any advice