-
Mail from Excel via Outlook
In my continuing quest , I have found that code such as
[VBA]With objmailitem
.To = "joe blow"
.Subject = "subject"
.Attachments.Add "c:\filename.xls"
.Send
End With
[/VBA]
won't really send my mail for me. It does however place the mail in Outlook's Outbox. (half the job, to my thinking)
If further
[VBA]Application.ActivateMicrosoftApp xlMicrosoftMail
objOLapp.Session.SyncObjects.Item(1).Start[/VBA]
Outlook opens, and the Send/Receive action takes place.
Outlook remains open in my routine, but the mail has been sent.
I'm not all that clear what I'm doing with the whole SyncObjects scenario, but perhaps someone can clear this issue up for me. Any advice would be appreciated.
-
I guess that you don't have Outlook configured to immediately send, so it is awaiting the next send/receive cycle. Syncing it forces the send/receive, Item(1) is all account profiles.
-
Is this an Outlook issue or Excel?
-
I have Outlook set for immediate Send/Receive (I believe "when connected" might be the relevent issue in my case).
firefytr: re: your question I don't know!
-
So your data gets moved to the Outbox. What version of Outlook are you running? Do you see anything in the status bar regarding a Send/Receive? Does it send when you manually Send the data (F9)? The second portion of code you posted, is that part of your entire routine? That second part confuses me as to what it does or does not do for you. Of course I was under the impression that the SyncObjects collection was for "Sync"'ing a device.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules