Aussiebear
01-20-2024, 05:07 AM
I was searching Microsofts VBA examples when I came across this explanation and its accompanying section of code. Is the code not saying that if the space is 12 point then change it to 6 points which is contrary to the supplied explanation.
This example loops through all of the paragraphs in the active document. If the space-before setting for a paragraph is 6 points, this example changes the spacing to 12 points
Sub LoopParagraphs()
Dim parCount As Paragraph
For Each parCount In ActiveDocument.Paragraphs
If parCount.SpaceBefore = 12 Then parCount.SpaceBefore = 6
Next parCount
End Sub
This example loops through all of the paragraphs in the active document. If the space-before setting for a paragraph is 6 points, this example changes the spacing to 12 points
Sub LoopParagraphs()
Dim parCount As Paragraph
For Each parCount In ActiveDocument.Paragraphs
If parCount.SpaceBefore = 12 Then parCount.SpaceBefore = 6
Next parCount
End Sub