#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 60
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 60
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Email Macro only sometime works? PaulW Excel Discussion (Misc queries) 0 August 15th 06 10:22 AM
can I copy a column of email addresses, paste into email address? Lizizfree New Users to Excel 4 July 20th 06 10:03 PM
sending email from excel not working Tripp Excel Discussion (Misc queries) 2 February 1st 06 08:42 PM
Move a Column of 500 Email Addresses into BCC Field of an Email Mark Excel Worksheet Functions 9 July 27th 05 05:07 AM
body of email disappears when I send an email from Excel ~A Excel Discussion (Misc queries) 0 February 25th 05 10:55 PM


All times are GMT +1. The time now is 10:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"