Code:
Function ScratchMacro()
'A basic Word Macro coded by Gregory K. Maxey
Dim strSearch As String
Dim iCount As Long, Hecho As Single
strSearch = "**"
iCount = 0
With ActiveDocument.Content.Find
.Text = strSearch
.Format = False
.Wrap = wdFindStop
Do While .Execute
iCount = iCount + 1
Loop
End With
Hecho = iCount / 2
'at end of document.
ActiveDocument.Range.InsertAfter vbCr & Hecho
'in a content control titled Hecho.
ActiveDocument.SelectContentControlsByTitle("Hecho").Item(1).Range.Text = Hecho
'in an table (first table, first cell)
ActiveDocument.Tables(1).Cell(1, 1).Range.Text = Hecho
End
lbl_Exit:
Exit Function
End Function