title: Run a word vba macro from vb script
body: <p>How can I call a word vba macro code from a VB Script:</p>
  
  <p>the word vba macro code is under:</p>
  
  <pre><code>Sub find_replace_vik_42216()
  
  
  Application.ScreenUpdating = False
  
  Selection.Find.ClearFormatting
  Selection.Find.Replacement.ClearFormatting
  With Selection.Find
      .Text = "abc"
      .Replacement.Text = "def"
      .Forward = True
      .Wrap = wdFindContinue
      .Format = False
      .MatchCase = False
      .MatchWholeWord = False
      .MatchWildcards = False
      .MatchSoundsLike = False
      .MatchAllWordForms = False
  End With
  With Selection
      If .Find.Forward = True Then
          .Collapse Direction:=wdCollapseStart
      Else
          .Collapse Direction:=wdCollapseEnd
      End If
      .Find.Execute Replace:=wdReplaceOne
  End With
  
  
  
  Selection.Find.ClearFormatting
  Selection.Find.Replacement.ClearFormatting
  With Selection.Find
      .Text = "pqr"
      .Replacement.Text = "xyz"
      .Forward = True
      .Wrap = wdFindContinue
      .Format = False
      .MatchCase = False
      .MatchWholeWord = False
      .MatchWildcards = False
      .MatchSoundsLike = False
      .MatchAllWordForms = False
  End With
  With Selection
      If .Find.Forward = True Then
          .Collapse Direction:=wdCollapseStart
      Else
          .Collapse Direction:=wdCollapseEnd
      End If
      .Find.Execute Replace:=wdReplaceOne
  End With
  
  Application.ScreenUpdating = True
  
  End Sub
  </code></pre>
  
  <p>could dear members create a vb script file which contains the above code, so that I call the vb script , in order to run the code.</p>
  
  <p>I have wrecked my brains and troubled google, to no avail. Please help.</p>
  
  <p>Thank you.</p>
  
  <p>Vik</p>