intercept if user send email.....

User avatar
sal21
PlatinumLounger
Posts: 4355
Joined: 26 Apr 2010, 17:36

intercept if user send email.....

Post by sal21 »

I have this code (attached)...
Is possible if really the user send the email create from code?
Actually the code show the email, need to be sure the user have send...
Possible?

User avatar
HansV
Administrator
Posts: 78487
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: intercept if user send email.....

Post by HansV »

The code (from Ron de Bruin) has a line

.Display 'or use .Send

If you change .Display to .Send the e-mail will be sent directly. It works best if the user has already started Outlook, otherwise the e-mail may remain in the Outbox until the user starts Outlook.
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4355
Joined: 26 Apr 2010, 17:36

Re: intercept if user send email.....

Post by sal21 »

HansV wrote:The code (from Ron de Bruin) has a line

.Display 'or use .Send

If you change .Display to .Send the e-mail will be sent directly. It works best if the user has already started Outlook, otherwise the e-mail may remain in the Outbox until the user starts Outlook.

ok...
but i can not to use .send because the master of application can add a comment and destination name "case per case" and if is correct send with button "send" from the curent mail showed...
Is possible if the master of application have pressed the "send" button from the eamil?

User avatar
HansV
Administrator
Posts: 78487
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: intercept if user send email.....

Post by HansV »

Sorry, I don't understand what you want.
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4355
Joined: 26 Apr 2010, 17:36

Re: intercept if user send email.....

Post by sal21 »

HansV wrote:Sorry, I don't understand what you want.
Simply, intercept via vb code if the user have clicked on "button send" from the email, just displayed and send the email...
or intercept the click send event from the email

User avatar
HansV
Administrator
Posts: 78487
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: intercept if user send email.....

Post by HansV »

I don't think you can do that. If you display the message, it is no longer controlled by your code.
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4355
Joined: 26 Apr 2010, 17:36

Re: intercept if user send email.....

Post by sal21 »

HansV wrote:I don't think you can do that. If you display the message, it is no longer controlled by your code.
ok now is all clear. tk!