vbscript-create-a-blank-email

VBScript - Create A Blank Email

This script file allows you to create a blank MS Outlook email.

VBScript

  • 2042
  • 614
  • 0
  • 0
Add to collection
© 2021VBAmacros.net

1 Open your favorite text editor. In our case we are going to use Notepad++

2 Copy the VBScript code from below.

3 Paste the code in the newly created file.


4 Save the file with a ".vbs" extension.


5 Run the script file by double-clicking on it or via the CMD console.


6 That's it!


Advertisement

Code
' This script creates a blank MS Outlook email.
Sub createBlankOutlookEmail()
	' Set variables
	Dim appOutlook
	' Create new outlook application object
	Set appOutlook = Wscript.CreateObject("Outlook.Application")
	' Create new mail item
    Set objMail = appOutlook.CreateItem(0)
    ' Use the newly created mail item
    With objMail
        ' Display the message before sending it
        .Display
    End With
    ' Release the mail item
    Set objMail = Nothing
	' Release the outlook application object
	Set appOutlook = Nothing
End Sub
' Run the procedure
Call createBlankOutlookEmail()
Advertisement


Comments
Sort by:
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Advertisement
  • Created
    19-May-2020
  • Last updated
    13-Jun-2020
Advertisement
VBAmacros.net VBAmacros.net
Code was successfully copied!
VBAmacros.net VBAmacros.net
Please sign in!
VBAmacros.net VBAmacros.net
You've already voted!