Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Email VB not working
I have this VB in my workbook
Sub eMailActiveWorkbook() Dim OL As Object Dim EmailItem As Object Dim Wb As Workbook Application.ScreenUpdating = False Set OL = CreateObject("Outlook.Application") Set EmailItem = OL.CreateItem(olMailItem) Set Wb = ActiveWorkbook Wb.Save With EmailItem .Subject = "Big Sandy Docks" .Body = "Wells Weekly Report" & vbCrLf & _ "" & vbCrLf & _ "" .To = "Wells" .Importance = olImportanceNormal .Attachments.Add Wb.FullName .Display End With Application.ScreenUpdating = True Set Wb = Nothing Set OL = Nothing Set EmailItem = Nothing End Sub and it works great except for one little detail, there are several of us on a shared drive that updates this workbook, when ever we try to email this workbook to the distribution list the workbook freeze up and I get the message that the workbook is not responding and must close (I have a button to send), but it works great if I drag the workbook to my desktop, open it, click the button and it works great. What am I going to have to do if anything. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Email VB not working
the problem was with our email system not with the VB which now works great.
"tankerman" wrote: I have this VB in my workbook Sub eMailActiveWorkbook() Dim OL As Object Dim EmailItem As Object Dim Wb As Workbook Application.ScreenUpdating = False Set OL = CreateObject("Outlook.Application") Set EmailItem = OL.CreateItem(olMailItem) Set Wb = ActiveWorkbook Wb.Save With EmailItem .Subject = "Big Sandy Docks" .Body = "Wells Weekly Report" & vbCrLf & _ "" & vbCrLf & _ "" .To = "Wells" .Importance = olImportanceNormal .Attachments.Add Wb.FullName .Display End With Application.ScreenUpdating = True Set Wb = Nothing Set OL = Nothing Set EmailItem = Nothing End Sub and it works great except for one little detail, there are several of us on a shared drive that updates this workbook, when ever we try to email this workbook to the distribution list the workbook freeze up and I get the message that the workbook is not responding and must close (I have a button to send), but it works great if I drag the workbook to my desktop, open it, click the button and it works great. What am I going to have to do if anything. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Email Macro only sometime works? | Excel Discussion (Misc queries) | |||
can I copy a column of email addresses, paste into email address? | New Users to Excel | |||
sending email from excel not working | Excel Discussion (Misc queries) | |||
Move a Column of 500 Email Addresses into BCC Field of an Email | Excel Worksheet Functions | |||
body of email disappears when I send an email from Excel | Excel Discussion (Misc queries) |