I found the following vba code online and added it to my userform to open outlook and add the email address to the To line of the email. I would like to have the font in the body of the email default to Calibri 14 and also include my signature when the email opens. Is this possible and if so can you alter the code for me. Thank you in advance for any help.
Dim olkApp As Outlook.Application
Dim olkNameSpace As Outlook.Namespace
Dim olkDefaultFolder As Outlook.MAPIFolder
Dim olkMail As Outlook.MailItem
' If Outlook isn't open, open it
On Error Resume Next
Set olkApp = GetObject(, "Outlook.Application")
If Err.Number <> 0 Then Set olkApp = CreateObject("Outlook.Application")
On Error GoTo EH:
Set olkNameSpace = olkApp.GetNamespace("MAPI")
Set olkDefaultFolder = olkNameSpace.GetDefaultFolder(Outlook.olFolderInbox)
Set olkMail = olkDefaultFolder.Items.Add(Outlook.olMailItem)
' Use of CreateItem can cause run-time permission error -2044526587
'Set olkMail = olkApp.CreateItem(Outlook.olMailItem)
' Display mail message
With olkMail
.To = TextBox4
.CC = ""
.BCC = ""
.Subject = ""
.Body = ""
' If you wish to add an attachment:
'.Attachments.Add ActiveWorkbook.FullName
' If you wish to automatically send the email:
'.Send
' If you wish to manually send the email:
.Display
End With
EH:
' Release variables
Set olkMail = Nothing
Set olkDefaultFolder = Nothing
Set olkNameSpace = Nothing
Set olkApp = Nothing
Bookmarks