AsMok
IT IS ME ^_^
- Local time
- Today, 01:33
- 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
--------
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
--------