T
TazCoder
Hello;
I have a question about a message box code I have implemented inside of
a macro for Word 2003. On my computer (Word 2003) The box output is
even, everything lines up.
One some other computer I have tried this macro on, (Word 2003) three
of the outputs do not appear correct.
The code is:
Function showStats()
Dim strStats As String
Dim iStatIndex As Integer
strStats = ""
For iStatIndex = 1 To 10
strStats = strStats &
ActiveDocument.Content.ReadabilityStatistics(iStatIndex)
If iStatIndex = 1 Then
strStats = strStats & vbTab & vbTab & vbTab & " : "
ElseIf iStatIndex = 4 Then
strStats = strStats & vbTab & vbTab & vbTab & " : "
ElseIf iStatIndex = 8 Or iStatIndex < 5 Then
strStats = strStats & vbTab & vbTab & " : "
ElseIf iStatIndex = 9 Then
strStats = strStats & vbTab & vbTab & " : "
ElseIf iStatIndex = 6 Then
strStats = strStats & vbTab & vbTab & " : "
Else
strStats = strStats & vbTab & " : "
End If
strStats = strStats &
ActiveDocument.Content.ReadabilityStatistics(iStatIndex).Value
strStats = strStats & vbCrLf
Next
MsgBox strStats, vbOKOnly, "Readability Statistics"
End Function
The outputs for iStatIndex = to 4, 6, 9, on other computers are 1 (one)
vbTab after the other 7. Why is it doing this?
Any input on what my problem is, and if/how it can be fixed would be
great!
- TazCoder
I have a question about a message box code I have implemented inside of
a macro for Word 2003. On my computer (Word 2003) The box output is
even, everything lines up.
One some other computer I have tried this macro on, (Word 2003) three
of the outputs do not appear correct.
The code is:
Function showStats()
Dim strStats As String
Dim iStatIndex As Integer
strStats = ""
For iStatIndex = 1 To 10
strStats = strStats &
ActiveDocument.Content.ReadabilityStatistics(iStatIndex)
If iStatIndex = 1 Then
strStats = strStats & vbTab & vbTab & vbTab & " : "
ElseIf iStatIndex = 4 Then
strStats = strStats & vbTab & vbTab & vbTab & " : "
ElseIf iStatIndex = 8 Or iStatIndex < 5 Then
strStats = strStats & vbTab & vbTab & " : "
ElseIf iStatIndex = 9 Then
strStats = strStats & vbTab & vbTab & " : "
ElseIf iStatIndex = 6 Then
strStats = strStats & vbTab & vbTab & " : "
Else
strStats = strStats & vbTab & " : "
End If
strStats = strStats &
ActiveDocument.Content.ReadabilityStatistics(iStatIndex).Value
strStats = strStats & vbCrLf
Next
MsgBox strStats, vbOKOnly, "Readability Statistics"
End Function
The outputs for iStatIndex = to 4, 6, 9, on other computers are 1 (one)
vbTab after the other 7. Why is it doing this?
Any input on what my problem is, and if/how it can be fixed would be
great!
- TazCoder