LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 94
Default Can't catch a break today - email from Excel troubles

Thanks JP.

You were correct in your initial review that the original code does actually
work. I tried this at work to send to co-workers and it failed, but I had
also used it to send to my home address and it worked.

I was wondering if you had any thoughts on why it might fail at work. Im
sure they have additional securities in place that it has to deal with, but
you think it would at least bounce back to me or something else if that was
the issue.

Any thoughts on what I could check to see if thats the case with my
workplace IT?

Thanks - Jenny B.


It worked for me. May I make some suggestions for your code? I wasn't
sure what "aFrom" was so I commented it out (for purposes of
debugging).

Sub SalesandLisaEmail()

Dim olApp As Outlook.Application
Dim Msg As Outlook.MailItem

On Error Resume Next
Set olApp = GetObject(, "Outlook.Application")
If Err.Number < 0 Then
Set olApp = CreateObject("Outlook.Application")
End If
On Error GoTo 0

If olApp Is Nothing Then
MsgBox "Cannot start Outlook.", vbExclamation
GoTo ExitProc
End If

Set Msg = olApp.CreateItem(olMailItem)

With Msg
.Subject = "New Issue" & " - " & ActiveSheet.Range("h5").Value
.Body = "There is a new B55 Checklist for review." & vbNewLine & _
vbNewLine & "After you've had a chance to review and sign off on
the Checklist," & _
"please forward to the DMS Group for final review." & vbNewLine &
vbNewLine & _
"Thank you - DMS Group."

With .Recipients
.Add ")
.ResolveAll
End With

' Const olOriginator = 0
' If Len(aFrom) 0 Then .Recipients.Add(aFrom).Type = olOriginator

.Send
End With

ExitProc:
Set Msg = Nothing
Set olApp = Nothing
End Sub




On Jan 15, 4:25 pm, Jenny B. wrote:
I just tried to add other recipients other than my test self to the email and
it still send to me.

Even after I totally removed my email and inserted another person - it sent
the email solely to me. Any thoughts?

Sub SalesandLisaEmail()

Dim Outlook
Set Outlook = CreateObject("Outlook.Application")

Dim Message
Set Message = Outlook.CreateItem(olMailItem)
With Message

.Subject = "New Issue" & " - " & ActiveSheet.Range("h5").Value
.body = "There is a new B55 Checklist for review." & vbNewLine &
vbNewLine & "After you've had a chance to review and sign off on the
Checklist, please forward to the DMS Group for final review." & vbNewLine &
vbNewLine & "Thank you - DMS Group."
Application.DisplayAlerts = False
.Recipients.Add ")

Const olOriginator = 0
If Len(aFrom) 0 Then .Recipients.Add(aFrom).Type = olOriginator

.Send
End With
Call Clear
End Sub



 
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
how to catch the second or more cell with vlookup Valley Excel Worksheet Functions 8 April 24th 06 12:02 AM
Anyone have troubles running 2003 macros in 2000 version of Excel Jim Excel Discussion (Misc queries) 0 April 19th 06 02:15 PM
Email editor closes when forwarding Excel-embedded email Bambina Setting up and Configuration of Excel 0 March 16th 06 10:45 PM
=IF(OR(TODAY()G9),"Pass","Overdue") Why doe it not wo. Fkor Excel Discussion (Misc queries) 3 March 10th 05 08:29 AM
How do I 'catch' a 'delete cells' event Eric Excel Discussion (Misc queries) 2 March 9th 05 07:22 PM


All times are GMT +1. The time now is 01:01 PM.

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

About Us

"It's about Microsoft Excel"