VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Open Outlook send mail window with attachments

by John O'Donald ()
Category: Microsoft Office Apps/VBA
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (22 Votes)

Open Outlook send mail window with attachments from a vb application. Also, change m.display to m.send if you want to just send the email and not preview it! Also works in vbscript! Copy code to a text file and save with a *.vbs extension and double click to activate. Super Cool.

Rate Open Outlook send mail window with attachments

Dim o 
 Dim m
 
 Set o = CreateObject("Outlook.Application")
 Set m = o.CreateItem(0)
 
 m.To = "[email protected]"
 m.Subject = "This is the Subject"
 m.Body = "Hey, this is cool!"
 m.Attachments.Add "C:\Temp\FileToAttach.txt"
 'Repeat this line if there are more Attachments
 m.Display
 'm.Send 'If you want to just send it

Download this snippet    Add to My Saved Code

Open Outlook send mail window with attachments Comments

No comments have been posted about Open Outlook send mail window with attachments. Why not be the first to post a comment about Open Outlook send mail window with attachments.

Post your comment

Subject:
Message:
0/1000 characters