Skip to content

Instantly share code, notes, and snippets.

@udoschneider
Created July 16, 2013 11:25
Show Gist options
  • Save udoschneider/6007897 to your computer and use it in GitHub Desktop.
Save udoschneider/6007897 to your computer and use it in GitHub Desktop.
A small VBS script to create an Outlook Mail from an HTML file.
' OutlookHtmlMail.vbs
' Open a new Outlook Mail with the content of the dropped HTML file copied verbatim.
' (c) 2007 Udo Schneider <Udo.Schneider@homeaddress.de>
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.OpenTextFile(WScript.Arguments.Item(0))
strText = ts.ReadAll
Set outlook = createobject("Outlook.Application")
Set message = outlook.createitem(olMailItem)
With message
.HTMLBody = strText
.Display
End With
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment