Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have set up an excel book that when a button is pressed it auto emails the
saved book via Lotus Notes. I now need to do the same but via Outlook. I have used the code associated with SendWithOutlook but I get an error message straight off, on the line Dim objOL As New Outlook.Application. The error is "Compile error: User-defined type not defined". any ideas? Sub SendWithOutlook() Dim objOL As New Outlook.Application Dim objMail As MailItem Set objOL = New Outlook.Application Set objMail = objOL.CreateItem(olMailItem) |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Create a reference to the Outlook object model in tools- references in the
VBE or use late binding. -- Regards, Tom Ogilvy "Paul Dennis" wrote: I have set up an excel book that when a button is pressed it auto emails the saved book via Lotus Notes. I now need to do the same but via Outlook. I have used the code associated with SendWithOutlook but I get an error message straight off, on the line Dim objOL As New Outlook.Application. The error is "Compile error: User-defined type not defined". any ideas? Sub SendWithOutlook() Dim objOL As New Outlook.Application Dim objMail As MailItem Set objOL = New Outlook.Application Set objMail = objOL.CreateItem(olMailItem) |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do I make a reference? Is it a matter of ticking one of the options? if
so which one? You can guess I'm a novice at this. "Tom Ogilvy" wrote: Create a reference to the Outlook object model in tools- references in the VBE or use late binding. -- Regards, Tom Ogilvy "Paul Dennis" wrote: I have set up an excel book that when a button is pressed it auto emails the saved book via Lotus Notes. I now need to do the same but via Outlook. I have used the code associated with SendWithOutlook but I get an error message straight off, on the line Dim objOL As New Outlook.Application. The error is "Compile error: User-defined type not defined". any ideas? Sub SendWithOutlook() Dim objOL As New Outlook.Application Dim objMail As MailItem Set objOL = New Outlook.Application Set objMail = objOL.CreateItem(olMailItem) |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes. Look down the list until you find Microsoft Outlook and tick that.
-- Regards, Tom Ogilvy "Paul Dennis" wrote: How do I make a reference? Is it a matter of ticking one of the options? if so which one? You can guess I'm a novice at this. "Tom Ogilvy" wrote: Create a reference to the Outlook object model in tools- references in the VBE or use late binding. -- Regards, Tom Ogilvy "Paul Dennis" wrote: I have set up an excel book that when a button is pressed it auto emails the saved book via Lotus Notes. I now need to do the same but via Outlook. I have used the code associated with SendWithOutlook but I get an error message straight off, on the line Dim objOL As New Outlook.Application. The error is "Compile error: User-defined type not defined". any ideas? Sub SendWithOutlook() Dim objOL As New Outlook.Application Dim objMail As MailItem Set objOL = New Outlook.Application Set objMail = objOL.CreateItem(olMailItem) |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have the same problem, when I follow the suggestion at my MS Access, Tool-reference, I am not able to locate "reference' menu item. I am using MS Access 200 3 and Outlook 2003. thanks. "Paul Dennis" wrote: I have set up an excel book that when a button is pressed it auto emails the saved book via Lotus Notes. I now need to do the same but via Outlook. I have used the code associated with SendWithOutlook but I get an error message straight off, on the line Dim objOL As New Outlook.Application. The error is "Compile error: User-defined type not defined". any ideas? Sub SendWithOutlook() Dim objOL As New Outlook.Application Dim objMail As MailItem Set objOL = New Outlook.Application Set objMail = objOL.CreateItem(olMailItem) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I set up Outlook email? | New Users to Excel | |||
Outlook Email | New Users to Excel | |||
Outlook Email | Excel Programming | |||
Email & Outlook | Excel Discussion (Misc queries) | |||
Late Binding to Outlook from Excel: Outlook modifies email body | Excel Programming |