Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default Sending Mail from within Excel

Hi,

With the help of code obtained from Ron De Bruin's excellent examples I have
code to send a copy of a worksheet directly from Excel.

Conditions
If there is an internet connection the sheet is sent automatically.
If not, a connection dialogue box is shown.
If the user decides to NOT connect the post is placed in the Outbox.

Query
How can I, using code following the SendMail . . . . instruction, arrange
for a message to be displayed, saying that either the Mail has been sent or
has been placed in the Outbox, whichever is the case.

Regards,
Don Lloyd


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Sending Mail from within Excel

Hi Don

In Outlook you can count the mails in the Outbox

Set myOlApp = CreateObject("Outlook.Application")
Set myOlNS = myOlApp.GetNamespace("MAPI")
Set myFolder = myOlNS.GetDefaultFolder(olFolderOutbox)
MsgBox myFolder.Items.Count

If you need more info about Outlook programming go to the
Outlook newsgroups.


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Don Lloyd" wrote in message ...
Hi,

With the help of code obtained from Ron De Bruin's excellent examples I have
code to send a copy of a worksheet directly from Excel.

Conditions
If there is an internet connection the sheet is sent automatically.
If not, a connection dialogue box is shown.
If the user decides to NOT connect the post is placed in the Outbox.

Query
How can I, using code following the SendMail . . . . instruction, arrange
for a message to be displayed, saying that either the Mail has been sent or
has been placed in the Outbox, whichever is the case.

Regards,
Don Lloyd




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default Sending Mail from within Excel

Thank you Ron

I'll follow it up.

Don

"Ron de Bruin" wrote in message
...
Hi Don

In Outlook you can count the mails in the Outbox

Set myOlApp = CreateObject("Outlook.Application")
Set myOlNS = myOlApp.GetNamespace("MAPI")
Set myFolder = myOlNS.GetDefaultFolder(olFolderOutbox)
MsgBox myFolder.Items.Count

If you need more info about Outlook programming go to the
Outlook newsgroups.


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Don Lloyd" wrote in message

...
Hi,

With the help of code obtained from Ron De Bruin's excellent examples I

have
code to send a copy of a worksheet directly from Excel.

Conditions
If there is an internet connection the sheet is sent automatically.
If not, a connection dialogue box is shown.
If the user decides to NOT connect the post is placed in the Outbox.

Query
How can I, using code following the SendMail . . . . instruction,

arrange
for a message to be displayed, saying that either the Mail has been sent

or
has been placed in the Outbox, whichever is the case.

Regards,
Don Lloyd






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
sending multipul e-mail from excel Carl R[_2_] Excel Discussion (Misc queries) 1 September 22nd 09 10:18 AM
sending an excel attachment in an e-mail drumane Excel Discussion (Misc queries) 2 April 21st 08 04:14 PM
Sending One Cell Through Mail from Excel Man Mohan Singh Excel Worksheet Functions 1 April 27th 07 10:56 AM
General mail failure when sending e-mail from Excel Adrienne Excel Discussion (Misc queries) 5 November 4th 05 12:59 PM
Sending mail from excel with CDO Christy[_5_] Excel Programming 3 December 9th 03 03:07 AM


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

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"