Sadhik
12-28-2017, 03:33 AM
Hi,
I am working in the word file which contains lot of reference numbers in superscript. I iterate through every reference number and check any reference number is missing. I have the problem with my following code. Please advise me.
Sub Superscription()
Dim opara As Paragraph
Dim x As Integer
Dim count As Integer
Dim i As Integer
Dim DocumentContent As Range
Set DocumentContent = ThisDocument.Content
With DocumentContent.Find
.Font.Superscript = True
.Format = True
.Forward = True
Do While .Execute
If .Found = True Then
x = DocumentContent.Text
End If
Loop
MsgBox " Total Number of Referemces is " & x
End With
For i = 1 To x
For Each opara In ActiveDocument.Paragraphs
If opara.Range.Text <> i Then
MsgBox i & " Not Found"
End If
Next
Next i
End Sub
Regards,
Sadhik
I am working in the word file which contains lot of reference numbers in superscript. I iterate through every reference number and check any reference number is missing. I have the problem with my following code. Please advise me.
Sub Superscription()
Dim opara As Paragraph
Dim x As Integer
Dim count As Integer
Dim i As Integer
Dim DocumentContent As Range
Set DocumentContent = ThisDocument.Content
With DocumentContent.Find
.Font.Superscript = True
.Format = True
.Forward = True
Do While .Execute
If .Found = True Then
x = DocumentContent.Text
End If
Loop
MsgBox " Total Number of Referemces is " & x
End With
For i = 1 To x
For Each opara In ActiveDocument.Paragraphs
If opara.Range.Text <> i Then
MsgBox i & " Not Found"
End If
Next
Next i
End Sub
Regards,
Sadhik