Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
send email macro with Outlook running
I have a small macro that runs in Excel that will attach a file and emails
the attachment. Runs fine when Outlook is not running, but I have problems when Outlook is already running. (runtime error ) and excel complains as well. Code looks like this: Set OutlookApp = CreateObject("Outlook.Application") Set OutlookMail = OutlookApp.CreateItem(0) Set NSpace = OutlookApp.GetNamespace("MAPI") OutlookMail.To = MailArchiveAddress 'EmailID OutlookMail.Subject = " File Upload from: " & Name OutlookMail.Body = "Calibration UpLoad File" OutlookMail.Attachments.Add MailAttach ' attachment filename OutlookMail.Display set OutlookMail = Nothing set OutlookApp = Nothing |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Send a Sheet as body of Outlook Email | Excel Discussion (Misc queries) | |||
Send Range to Outlook and Email it | Excel Programming | |||
How to send a single page email from excel 2000 using outlook xp | Excel Worksheet Functions | |||
***** PLEASE HELP **** Send an email from Excel to outlook with an automatic macro | Excel Discussion (Misc queries) | |||
How do use outlook express to send email in office 2003 | Excel Discussion (Misc queries) |