C
CJ
I have the following code which should, but does not, change paragraphs that
have exactly 24 or 12 pt spacing.
Can you advise me as to what is wrong with the code? I can't find anything
that addresses the issue in an if statement. I hope someone can help.
Sub ParaSpacingFix3()
'2. If the paras is set to exactly 12 points
' then make the spacing single spaced.
' If the paras is set to exactly 24 points
' then make the spacing double spaced.
Dim par As Paragraph
On Error GoTo NextPara
For Each par In ActiveDocument.Paragraphs
If par.LineSpacingRule = wdLineExactly Then
If par.LineSpacing = 24 Then
par.LineSpacingRule = wdLineSpaceDouble
ElseIf par.LineSpacing = 12 Then
par.LineSpacingRule = wdLineSpaceSingle
End If
End If
NextPara:
Next
End Sub
have exactly 24 or 12 pt spacing.
Can you advise me as to what is wrong with the code? I can't find anything
that addresses the issue in an if statement. I hope someone can help.
Sub ParaSpacingFix3()
'2. If the paras is set to exactly 12 points
' then make the spacing single spaced.
' If the paras is set to exactly 24 points
' then make the spacing double spaced.
Dim par As Paragraph
On Error GoTo NextPara
For Each par In ActiveDocument.Paragraphs
If par.LineSpacingRule = wdLineExactly Then
If par.LineSpacing = 24 Then
par.LineSpacingRule = wdLineSpaceDouble
ElseIf par.LineSpacing = 12 Then
par.LineSpacingRule = wdLineSpaceSingle
End If
End If
NextPara:
Next
End Sub