Quantcast
Channel: Outlook IT Pro Discussions forum
Viewing all articles
Browse latest Browse all 33562

How to run a .bat file fro Outlook 2007 macro

$
0
0

Hi,

This is my environment. My daily work is to download a .zip file from a site and unzip it than attached those unzip files to the email and send to the user one by one. I have created a .bat file to automatically unzip and delete the old files.

I have created the following macro to attached the unzip files but how do I add the additional macro to run the .bat file first and than attached the two files? And, how do I use macro to check the two files is available before it run the following macro?

Sub RAnew()
Set Msg = Application.CreateItemFromTemplate("D:\RA\RA1.oft")
Msg.SentOnBehalfOfName = "xxx-DoNotReply@xxx.com"
Msg.Attachments.Add ("D:\RA\x-xxxx.xxx")
Msg.Attachments.Add ("D:\RA\xxx_ONLY.zip")
Msg.Display
End Sub


Viewing all articles
Browse latest Browse all 33562

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>