Badriah
New Member
Hi everyone,
I'm trying to send a simple email from Excel using VBA. I'm using the following macro on a Windows system with Outlook installed:
	
	
	
		
Here are my questions:
				
			I'm trying to send a simple email from Excel using VBA. I'm using the following macro on a Windows system with Outlook installed:
		Code:
	
	Sub SendSimpleEmail()
    Dim OutApp As Object
    Dim OutMail As Object
    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)
    With OutMail
        .To = "example@example.com"
        .Subject = "Test Email"
        .Body = "This is a test email from Excel VBA."
        .Display
    End With
End SubHere are my questions:
- What is the purpose of CreateObject("Outlook.Application")?
- How can I attach the current workbook automatically to this email?
- Is there any way to make this kind of email macro work on a Mac?
 
	