Home > Net >  adding tab or space before the bulletpoints in my email body
adding tab or space before the bulletpoints in my email body

Time:08-12

I want to add space before the Chr(149) to make the email look more visually pleasing. Could you guys help me?

My current VBA code is the following:

Sub EmailHyperlink()
    'updated by Extendoffice 20190815
    Dim xOtl As Object
    Dim xOtlMail As Object
    Dim xStrBody As String
        xStrBody = "Hi [Name]" & "<br>" _
                  & " " & "<br>" _
                  & "we receives monthly traffic of 4,000 visitors looking for video services, and we can help [Agency Name] get more qualified inquiries." & "<br>" _
                  & " " & "<br>" _
                  & "We created a USD -worth of promotion package available for USD  only until August 17, 2022, which includes placements in:" & "<br>" _
                  & " " & "<br>" _
                  & Chr(149) & "<a href=""">Featured Video Design</a> - visitors,  avg. session time." & "<br>" _
                  & Chr(149) & "<a href="" "> Top Video Production Companies </a> -  visitors,  avg. session time." & "<br>" _
                  & Chr(149) & "<a href="" "> Top Video Marketing Agencies </a> -  visitors,  avg. session time." & "<br>" _
                  & Chr(149) & "<a href="" "> 10 Best Video Commercials </a> - visitors,  avg. session time." & "<br>" _
                  & " " & "<br>" _
                  & "Slots are limited and secured on a first-come, first-served basis." & "<br>" _
                  & "<br>" _
                  & "If interested, kindly reply to this email or <a href="" h""> book a meeting </a> with me." & "<br>" _
                  & " " & "<br>" _
                  & " " & "<br>" _
                  & "Thank you."
              
    On Error Resume Next
    Set xOtl = CreateObject("Outlook.Application")
    Set xOtlMail = xOtl.CreateItem(olMailItem)
    With xOtlMail
        .To = "Email Address"
        .CC = " "
        .Subject = "Would [Agency Name] want more exposure for its video services? "
        .HTMLBody = .HTMLBody & xStrBody
        .Display
    End With
    Set xOtl = Nothing
    Set xOtlMail = Nothing
End Sub

CodePudding user response:

i see you use <A HREF...>, suppose you could use unordered list with the <ul>-tag.

Here's an example from w3schools HTML Lists:

<ul>
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ul>
  • Coffee
  • Tea
  • Milk

CodePudding user response:

Do you mean vertical space or horizontal?

For vertical space, instead of using <br> it is easier to control spacing using <p>. So you might use <p style="margin:1em 0;">, or instead of 1em, 20px.

For horizontal space, you can add a bit more spacing by using a non-breaking space. So that will look like this: " &nbsp; ". That is, space, non-breaking space, space: and this will achieve three spaces. (Multiple spaces without the non-breaking space obviously only achieve one space.)

  • Related