CENTER alignment and a new outlook email

AsMok

IT IS ME ^_^
Local time
Today, 00:03
Joined
Sep 4, 2019
Messages
67
HI ALL

I use a sending outlook email button in my form with the following code
.....
IT works well
...
but I need to center the body part when the new email opens...

how can i adjust the code to achieve that??????

------------
-----------
Private Sub btnSend_Click()
Dim oApp As New Outlook.Application
Dim oEmail As Outlook.MailItem

Set oEmail = oApp.CreateItem(olMailItem)

oEmail.To = Me.txtTo
oEmail.Subject = Me.txtSubject
oEmail.Body = Me.txtBody
If Len(Me.txtAttachment) > 0 Then
oEmail.Attachments.Add Me.txtAttachment.Value
End If
With oEmail
If Not IsNull(.To) And Not IsNull(.Subject) And Not IsNull(.Body) Then
.Send
MsgBox "Email Sent!"
Else
MsgBox "Please fill out the required fields."
End If
End With
end sub
--------
 
AFAIK, requires HTML code tags and .HTMLBody.

oEmail.HTMLBODY = "<center>Some message here</center>"
 
many thanks for your reply

I will work on that
 

Users who are viewing this thread

Back
Top Bottom