Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to get code that will email the active workbook
to an email address that is located in a cell A1. I found the code below, but I get the following message whenever I try to use it: "Compile Error: User-defined type not defined". Any suggestions? Thanks! Matt Sub Send_Msg() Dim objOL As New Outlook.Application Dim objMail As MailItem Set objOL = New Outlook.Application Set objMail = objOL.CreateItem(olMailItem) With objMail .To = Range ("A1") .Subject = "Test" .Body = "Test" .Display End With Set objMail = Nothing Set objOL = Nothing End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
protect a workbook to email | Excel Discussion (Misc queries) | |||
How to email 1 sheet in a workbook? | New Users to Excel | |||
Email a worksheet vs workbook | Excel Discussion (Misc queries) | |||
cant email workbook thru excel | Excel Discussion (Misc queries) | |||
how to email one sheet only of a workbook | Excel Discussion (Misc queries) |