M
Mike S
I'm using this code from VB6 to open a workbook then email it. The
workbook opens and I can read from it, write to it, format cells, etc,
but when I try to send mail I get an error:
'OutputFile contains a valid path to a working .xls file
Set oExcel = CreateObject("Excel.Application")
oExcel.UserControl = False 'do not let user interact with sheet
Sleep 1000
oExcel.Visible = DisplayExcel
Set oBook = oExcel.Workbooks.Open(OutputFile)
Sleep 1000
oBook.SendMail "(e-mail address removed)", "Excel Email Test"
Run-time error '1004'
Method 'SendMail' of object _Workbook' failed
I would like to be able to send the workbook from any version of Excel
2000 or later, on any OS XP or later, if possible.
Any suggestions would be appreciated.
Mike
workbook opens and I can read from it, write to it, format cells, etc,
but when I try to send mail I get an error:
'OutputFile contains a valid path to a working .xls file
Set oExcel = CreateObject("Excel.Application")
oExcel.UserControl = False 'do not let user interact with sheet
Sleep 1000
oExcel.Visible = DisplayExcel
Set oBook = oExcel.Workbooks.Open(OutputFile)
Sleep 1000
oBook.SendMail "(e-mail address removed)", "Excel Email Test"
Run-time error '1004'
Method 'SendMail' of object _Workbook' failed
I would like to be able to send the workbook from any version of Excel
2000 or later, on any OS XP or later, if possible.
Any suggestions would be appreciated.
Mike