View Single Post
 
Old 03-27-2019, 03:43 PM
kevinbradley57 kevinbradley57 is offline Windows 7 64bit Office 2010 64bit
Advanced Beginner
 
Join Date: Jul 2017
Posts: 84
kevinbradley57 is on a distinguished road
Default Need VBA for SpaceAfterAuto=False

The following is part of an Excel macro that reports totals from a workbook in the body of an Outlook email as two unordered lists. The logic works, but it adds a space above and below each list. I've narrowed the problem down to the SpaceAfter paragraph formatting of the list items getting set to Auto by default. I need the VBA that sets SpaceAfterAuto=False on just those list items.

Code:
StrBody = StrBody & "<body style='font-family:Tahoma;font-size:12;line-height:1; margin-bottom:0; margin-top:0;'>" _
     & "<br>Current Period Highlights (through approximately " & dtCurrQtrEnd & "):" _
     & "<br>Completed:" _
     & "<ul><li>" & intReportsIssued & " audit reports</li>" _
     & "<li>" & intMemoIssued & " memos</li>" _
     & "<li>" & intProjCompleted & " audit support projects</li>" _
     & "</ul>" _
     & "Remaining:" _
     & "<ul><li>" & intReportsRemain & " audit reports</li>" _
     & "<li style=margin-top: -10px; margin-bottom: 0px; >" & intMemoRemain & " memos</li>" _
     & "<li>" & intProjRemain & " audit support projects</li>" _
     & "</ul><br>"