Is it possible to write a VB Script that will read the path of application in the Outlook email received by a particular sender or a subject and copy it to a designated location in the hard drive ?
Question ID: 105935


I am trying to design a VB Script which will read the .exe fie location based on the Outlook email notification, copy that and paste it to a designated location on the hard drive.
Is this feasible, if yes what would be the approach to follow ?

Marked as spam
Posted by (Questions: 4, Answers: 0)
Asked on February 10, 2015 7:53 am
Answers (1)
Private answer

It should be possible using the Outlook.Application object. I'm not exactly sure how you intend to use the path for saving or what format the email will be in, but here a short example:

Set myOlApp = CreateObject(''Outlook.Application'')
Set myItem = Me.Explorers.Item(1).Selection.Item(1)
myItem.SaveAs '''' & myItem.Subject & ''.msg'', olMSG

There is a very good (and lengthy) discussion on this with some function code that sounds exactly like what you described. You should be able to use the functions at the below site to give you a working example that you can modify to your own needs:


Marked as spam
Posted by (Questions: 2, Answers: 477)
Answered on February 18, 2015 7:43 pm

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

Scroll to Top