Decimal Separators in an E-Mail (HTML/CSS) programmed in Excel-VBA

Viewed 313

I have the following simple Excel spreadsheet:

          A                  B           C
1   25,000,000.50
2
3

And the following VBA code to send an E-Mail with the content of Cell A1:

Sub Separators_in_Email()
    If ExitAll = False Then
        Dim OApp As Object, OMail As Object, signature As String
        Set OApp = CreateObject("Outlook.Application")
        Set OMail = OApp.CreateItem(0)
            With OMail
            .display
            End With
            signature = OMail.HTMLBody
            With OMail
            .To = "test@test.de"
            .Subject = "test"
            .HTMLBody = "<p> I want this number " & Sheet1.Range("A1") & " to be shown with its decimal separators as in the Excel sheet</p>"
            End With
        Set OMail = Nothing
        Set OApp = Nothing
    Else
    End If
End Sub

The E-Mail itself works perfectly.

However, as you can see in the Excel spreadsheet I use "," as decimal separators. In the E-Mail this decimal separators are not used. Instead the number is written as 25000000.5 without the ",".

Is there a way in VBA or HTML/CSS to show the number from the sheet with the correct decimal separators?

1 Answers
Related