Sending Email via Excel Workbook question

  • Thread starter Thread starter marat
  • Start date Start date
M

marat

I have a C# app that sends an excel file as an attachment. The only
problem is that it prompts the user with a dailog box asking if really
necessary to send it - saying it could possibly be a virus if not
intended for email... I have Windows 2000 and would really want to
disable this manual intervention - any ideas ?

// Simple code below ...

Excel.Application oXL = new Excel.Application();
....
oWS = (Excel._Worksheet)oWB.ActiveSheet;
....
oWB.SendMail(emailAddress, title, Type.Missing);



Thank you
 
marat,

You won't be able to disable it. Excel is probably using MAPI (through
CDO) which has security code to indicate that something is trying to send
email through the system, and is alerting the user to that fact. It's there
to prevent viruses and the like from spreading email unknown to the user.

Hope this helps.
 
Back
Top