JohnLivewire
09-18-2017, 02:47 PM
I'm trying to get a line spacing of 1.0 using VBA but something is wrong with the macros recorder.
In the ribbon I click: Developer > Record Macro
To start recording, I click: ok
In the ribbon, I click: Home > Line and Paragraph Spacing > 1.0
In the ribbon, I click: Developer > Stop Recording
This is the VBA code I got from that recording:
Sub Macro1()
'
' Macro1 Macro
'
'
Selection.ParagraphFormat.LineSpacing = LinesToPoints(32888)
End Sub
When I try to run that code. I get a pop up window with this error message:
Run-time error '5149':
The measurement must be between 0.7 pt and 1584 pt.
How do I get a line spacing of 1.0 using VBA?
In the ribbon I click: Developer > Record Macro
To start recording, I click: ok
In the ribbon, I click: Home > Line and Paragraph Spacing > 1.0
In the ribbon, I click: Developer > Stop Recording
This is the VBA code I got from that recording:
Sub Macro1()
'
' Macro1 Macro
'
'
Selection.ParagraphFormat.LineSpacing = LinesToPoints(32888)
End Sub
When I try to run that code. I get a pop up window with this error message:
Run-time error '5149':
The measurement must be between 0.7 pt and 1584 pt.
How do I get a line spacing of 1.0 using VBA?