Track Changes

S

Sal

Hi
I don mean to clutter this forum. But, I m unable to find a solution.
Hence, I m posting the query once again.


I’m currently editing a doc. I’m tagging the mistakes using the
Comments balloon (the one in track changes options). While tagging
the
mistakes, I’m using abbreviations or some words for my understanding
like FL, MAS, and so on inside the Comments balloon.


My requirement is that, after I complete reviewing the doc, I want to
run a macro that shall read the contents present in the comments tag.
I want the macro to recognize the number of instances FL, MAS, and
other type of errors. Upon completion, I need a consolidated error
count of the doc. This will be the addition of FL type of errors and
MAS type of errors. I want this to me appear in an excel sheet or a
note pad or a separate document.


For eg: Number of FL errors is 5
Number of MAS errors is 10
Total number of errors will be 15.


I will be glad if someone can help me with this.


Regards,


Sally
 
G

Graham Mayor

The following will evaluate FL and MAS. You can add in other text strings as
required using a similar format

Sub CountFL_MAS()
Dim oComment As Comment
Dim iFLCount As Integer
Dim iMASCount As Integer
Dim oNewdoc As Document
iFLCount = 0
iMASCount = 0
For Each oComment In ActiveDocument.Comments
If InStr(1, oComment.Range, "FL") Then
iFLCount = iFLCount + 1
End If
If InStr(1, oComment.Range, "MAS") Then
iMASCount = iMASCount + 1
End If
Next oComment
Set oNewdoc = Documents.Add
oNewdoc.Range.Text = "Number of FL errors is " & iFLCount & vbCr _
& "Number of MAS errors is " & iMASCount & vbCr & _
"Total number of errors will be " & iFLCount + iMASCount
End Sub

http://www.gmayor.com/installing_macro.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Hi
I don mean to clutter this forum. But, I m unable to find a solution.
Hence, I m posting the query once again.


I’m currently editing a doc. I’m tagging the mistakes using the
Comments balloon (the one in track changes options). While tagging
the
mistakes, I’m using abbreviations or some words for my understanding
like FL, MAS, and so on inside the Comments balloon.


My requirement is that, after I complete reviewing the doc, I want to
run a macro that shall read the contents present in the comments tag.
I want the macro to recognize the number of instances FL, MAS, and
other type of errors. Upon completion, I need a consolidated error
count of the doc. This will be the addition of FL type of errors and
MAS type of errors. I want this to me appear in an excel sheet or a
note pad or a separate document.


For eg: Number of FL errors is 5
Number of MAS errors is 10
Total number of errors will be 15.


I will be glad if someone can help me with this.


Regards,


Sally
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top