ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sending an email with Excel macro (https://www.excelbanter.com/excel-discussion-misc-queries/123506-sending-email-excel-macro.html)

Ralph

Sending an email with Excel macro
 
I am using the following code to send an email but I still have to click the
Send button. How do I automate this?

'Send by email the txt work file
Workbooks.OpenText Filename:=PCODir & PCOFil, Origin:=xlMSDOS,
StartRow:=1, _
DataType:=xlFixedWidth, FieldInfo:=Array(Array(0, 1)),
TrailingMinusNumbers:=True
Application.CutCopyMode = False
Application.Dialogs(xlDialogSendMail).Show Emailto, "Pick-confirm
file attached"
ActiveWorkbook.Close



All times are GMT +1. The time now is 12:03 AM.

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