VB script to send mail automatically from Outlook Mailbox

We have instances where we will be sending template mails repeatedly from our Outlook mail box and drafting them every time is a time consuming process. So to make this easy we can use the below VB script to send those mails automatically just at a click.


String extraction between strings using VB Script MID & Split Commands.

Below is script and explanation for extracting string between string (delimiters) using VB script.

Explained

  • Our objective is to extract as https download link between the delimiters "   <" & ">" from a text file.
  • First we will locate the line in text file "DownloadLink.txt", where the extraction should happen using the search key word "<https".
  • Then comes the extraction part using MID & Split commands. 
  • Split command splits the line wherever it find the ">" delimiter and makes the split elements into an array and the first element (0) (as mentioned in the command) of the array is returned to MID command.
  • Now the MID has the full element starting from "   <https. But all we need is only the link. As mentioned in the command it will return the string starting from the 4th character in the element.
  • Thus we get only our required download link.
VB Script:



Input & Output: