Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-31-2018, 12:40 PM
kevinbradley57 kevinbradley57 is offline Override Outlook paragraph space before and after Windows 7 64bit Override Outlook paragraph space before and after Office 2010 64bit
Advanced Beginner
Override Outlook paragraph space before and after
 
Join Date: Jul 2017
Posts: 85
kevinbradley57 is on a distinguished road
Default Override Outlook paragraph space before and after

The code below generates a new Outlook email with text in the body, but the paragraph space before and after are set to Auto and I need it set to 0. Thank you!



Code:
Sub Mail()
    Dim rng As Range
    Dim OutApp As Object
    Dim OutMail As Object
    Dim StrBody As String
    Dim SigString As String
    Dim Signature As String
 
    StrBody = "<p style='font-family:Tahoma;font-size:12;margin-bottom:.0001pt'>The Weekly Plan Status dated M.D.YY is attached and " _
    & "at Q:\Audit\CAS Plan Status\2018 Plan Status Reports\3Q 7.10.18 to TBD\Weekly.</p>" _
    & "<p style='font-family:Tahoma;font-size:12'>Current Period Highlights:</p>" _
    & "<ul><p style='font-family:Tahoma;font-size:12'>" _
    & "<li><p style='font-family:Tahoma;font-size:12'>NN audit reports issued</li></p>" _
    & "<li><p style='font-family:Tahoma;font-size:12'>NN xxxx issued</li></p>" _
    & "</ul>" _
    & "<p style='font-family:Arial;font-size:12'<Strong>Professional Practices | Corporate Audit Services</Strong><br>" _
    & "professional.practices@usbank.com<br><br>" _
    & "<strong>U.S. Bancorp</strong><br>" _
    & "<strong>U.S. Bank Plaza</strong><br>" _
    & "200 South 6th Street, Minneapolis, MN 55402 | EP-MN-L8CA | www.usbank.com</p>"
    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)
    On Error Resume Next
    With OutMail
        .To = ""
        .CC = ""
        .BCC = ""
        .Subject = "Weekly Plan Status " & Format(Date, "m.d.yy")
        .HTMLBody = StrBody
        .Attachments.Add ActiveWorkbook.FullName
        .Display   'or use .Send
    End With
    On Error GoTo 0
    With Application
        .EnableEvents = True
        .ScreenUpdating = True
    End With
    Set OutMail = Nothing
    Set OutApp = Nothing
End Sub
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Override Outlook paragraph space before and after Why when I paste text into word, blank space appears after a paragraph & I can't delete it? AWD Word 3 10-16-2018 01:10 PM
Override Outlook paragraph space before and after Space tab at the beginning of each paragraph in a chapter village Word 3 07-20-2018 01:48 AM
Paragraph space before - can styles apply it intelligently? timpani Word 7 10-23-2012 04:08 PM
fixed width white space in distributed paragraph ronaldo.k PowerPoint 0 08-05-2012 09:25 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:14 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft