Sending An E-Mail With Excel 97
Posted by Bryan Reid on February 10, 2001 3:07 AM
I am creating a macro with Excel 97 that automatically creates and emails a file to a distribution list using Outlook.
Everything works great if Outlook is running when I run the macro but if not ...... well, it falls over!
I think I need to find some VBA code that will allow me to perform a test to see if Outlook is currently running. If not, well I'll exit the macro after a msgbox appears, if it is present then the code can carry on.
Any ideas on how to test to see if an external program (Outlook) is currently running???
I have tried a few things like running Outlook everytime using the Shell command and I have tried using the AppActivate command but that changes the focus and seems to stop the excel code from continuing until I refocus (manually) on Excel.
Anyway, any ideas????????