How to send Mail Item manually
Hi, All
I m creating an Addin to check whether user has not filled any recipient of the Mail. In this case (if user has left all of its recipients blank), I want to send my mails to a specefied email address.
I have written the code for it in myOLApp_ItemSend but problem is that
when I leave blank all its recipient then a message comes .
"There must be at least one name or distribution list in the TO,cc,bcc Box" .
My code executes after this message.
I don't want this message and want to execute my code written in
myOLApp_ItemSend Procedure.
Any help is appriciated
Thanks
Re: How to send Mail Item manually
If they leave the To blank and you have a CC or BCC I would suggest that when its blank you substitute your email address in the to and be done with it. :)
Re: How to send Mail Item manually
I want to check when user leave blank To,CC,BCC then this mail should go to a particular email Address, without giving any message.
Currently my problem is that whenever user leave blank To,CC,BCC then that message appears.
Re: How to send Mail Item manually
Hmm, havent tested it but does the ItemSend event still fire before the error msg comes up?
Re: How to send Mail Item manually
No sir,
Actually when I want to send a mail leaving to,cc,bcc fields blank, then that message appears(after clicking the SEND button) and after that my code executes that is written in myOlApp_ItemSend Procedure.
My requirements is that I want to leave blank to,cc,bcc and want to send mail to a default recipient that is given in my code.
but when I leave blank to,cc,bcc that message appears and I have to enter something in anyone field, otherwise this message appears again and again, that I don't want.
I don't know how to stop it.
Please reply me soon
Re: How to send Mail Item manually
If the msg is popping up first before the code execute s the item send event then you cant do it from managed/automation code. You will need to modify the Outlook Form and add VB Script code to the event and see if it fires before the error msg. I doubt that it will but could be worth a try.
Re: How to send Mail Item manually
Thanks RobDog
could you explain the managed/automation code. or
any sample or helping hints.
Thanks again
Re: How to send Mail Item manually
Re: How to send Mail Item manually
Thanks a lot for reply RobDog But As I know Outlopk's Message form cannot be customized.
AM I right.
anyways what is the event that cause that popup to appear. If this can be catch ,
then rest of thing is ok.
Any Idea??
Re: How to send Mail Item manually
So you didnt see my FAQ link I posted in the post above?
http://www.vbforums.com/images/ieima...chmentid=50458