ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Send e-mail (https://www.excelbanter.com/excel-discussion-misc-queries/136174-send-e-mail.html)

Andrea

Send e-mail
 
Hi all,
I've created a macro which on button press (button is on an Excel file) send
an e-mail via Outlook (sender, recipient, and attached file are constant).
In order to send I use Application.Dialogs(xlDialogSendMail).Show.
Now I would that this e-mail doesn't appear on send-mail-folder of Outlook.
Is this possible?
Exist a better method migliore in order to send and don't write on
send-mail-folder?
Or, it's possible to send, and in a second step delete this e-mail from
send-mail-folder?
Thanks in advance
JFM



Ron de Bruin

Send e-mail
 
Hi Andrea

It is possible to delete in Outlook but try CDO first.
http://www.rondebruin.nl/cdo.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Andrea" wrote in message . ..
Hi all,
I've created a macro which on button press (button is on an Excel file) send
an e-mail via Outlook (sender, recipient, and attached file are constant).
In order to send I use Application.Dialogs(xlDialogSendMail).Show.
Now I would that this e-mail doesn't appear on send-mail-folder of Outlook.
Is this possible?
Exist a better method migliore in order to send and don't write on
send-mail-folder?
Or, it's possible to send, and in a second step delete this e-mail from
send-mail-folder?
Thanks in advance
JFM



Andrea

Send e-mail
 
Hi Ron,
thanks for your reply.
Your method is exactly what I'm looking for. Great!

Only a little problem: sometimes (not always), when your procedure
CDO_Send_Workbook() is running, when it come to iMsg.Send, here an alert
like this

run-time error '.........':
The transport failed to connect to the server.

appear, after clicking 'OK' I go in debug-mode, and if I press 'F8' or 'F5'
in order to re-try to execute Send instruction, all seems work fine 'cause I
can find my expected mail in my mailbox.

Do you know what is the source of this trouble? It's possible to avoid this
behavior?
Thanks in advance
JFM




"Ron de Bruin" ha scritto nel messaggio
...
Hi Andrea

It is possible to delete in Outlook but try CDO first.
http://www.rondebruin.nl/cdo.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Andrea" wrote in message

. ..
Hi all,
I've created a macro which on button press (button is on an Excel file)

send
an e-mail via Outlook (sender, recipient, and attached file are

constant).
In order to send I use Application.Dialogs(xlDialogSendMail).Show.
Now I would that this e-mail doesn't appear on send-mail-folder of

Outlook.
Is this possible?
Exist a better method migliore in order to send and don't write on
send-mail-folder?
Or, it's possible to send, and in a second step delete this e-mail from
send-mail-folder?
Thanks in advance
JFM





Ron de Bruin

Send e-mail
 
Hi Andrea

You can try to add trhis

..Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Andrea" wrote in message ...
Hi Ron,
thanks for your reply.
Your method is exactly what I'm looking for. Great!

Only a little problem: sometimes (not always), when your procedure
CDO_Send_Workbook() is running, when it come to iMsg.Send, here an alert
like this

run-time error '.........':
The transport failed to connect to the server.

appear, after clicking 'OK' I go in debug-mode, and if I press 'F8' or 'F5'
in order to re-try to execute Send instruction, all seems work fine 'cause I
can find my expected mail in my mailbox.

Do you know what is the source of this trouble? It's possible to avoid this
behavior?
Thanks in advance
JFM




"Ron de Bruin" ha scritto nel messaggio
...
Hi Andrea

It is possible to delete in Outlook but try CDO first.
http://www.rondebruin.nl/cdo.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Andrea" wrote in message

. ..
Hi all,
I've created a macro which on button press (button is on an Excel file)

send
an e-mail via Outlook (sender, recipient, and attached file are

constant).
In order to send I use Application.Dialogs(xlDialogSendMail).Show.
Now I would that this e-mail doesn't appear on send-mail-folder of

Outlook.
Is this possible?
Exist a better method migliore in order to send and don't write on
send-mail-folder?
Or, it's possible to send, and in a second step delete this e-mail from
send-mail-folder?
Thanks in advance
JFM






All times are GMT +1. The time now is 07:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com