Thread: [Solved] VBA macros
View Single Post
 
Old 07-19-2011, 12:16 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
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 tays01s,

Since the macro recorder apparently captured your 'email' sub, I doubt using a trial version has anything to do with it (unless, perhaps, the trial period has expired).

For a recorded Find/Replace macro, you should see code like:
Code:
Sub Macro1()
'
' Macro1 Macro
'
'
  Selection.Find.ClearFormatting
  Selection.Find.Replacement.ClearFormatting
  With Selection.Find
    .Text = "some text"
    .Replacement.Text = "^&"
    .Forward = True
    .Wrap = wdFindContinue
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchAllWordForms = False
    .MatchSoundsLike = False
    .MatchWildcards = True
  End With
  Selection.Find.Execute Replace:=wdReplaceAll
End Sub
If you care to describe what you're trying to achieve, I might be able to provide you with something far more efficient than what the macro recorder will give you.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote