Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dear All, I am using the coding

Status
Not open for further replies.

robcarr

Programmer
May 15, 2002
633
GB
Dear All,

I am using the coding below to send the current file to an email address, everytime I send the email, I get a virus warning type message, is there another way to send the current file as an attachment to somebody, so I dont get the message appearing.
Also is there anyway to add say 1 line of text in the message as well.

Sub sendfile()

ActiveWorkbook.SendMail "email address", "Subject Line", Null
End Sub

Thanks in advance.
 
Hi Rob
oops - typo - this may be a re-post
Use the line
application.displayalertes = false

before the send mail and set it back to true afterwards

Regarding the line of text - AFAIK, you can't do that with the sendmail command - you'd have to open up your mail package via code. If you want to go down that path, there's definately some outlook code lying around in the archives and I've got some code I use for Lotus Notes

HTH
~Geoff~
[noevil]
 
Thanks for the suggestion of display alerts, but this didn't resolve the error message, I believe the error message is display by Outlook, is there another way to just send the current file as an attachment to a recipent.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top