Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to send an email via VBA from with Excel.
But many people who will use this spreadsheet have various versions of Outlook. So I am trying to use late binding becuase settting a reference to outlook does not seem to work. here is the basic code for sending the email Private Sub SendPers(savetype As Integer) Dim myOL As Outlook.Application Dim newmessage As MailItem Set myOL = CreateObject("Outlook.Application") Set newmessage = myOL.CreateItem(olMailItem) With newmessage If savetype = 1 Then .Body = "A new skills survey has been entered for " & myfname Else .Body = "A change has been made to the skills survey for " & myfname End If .Subject = "Skills Inventory " & myfname .To = "Jones, Mary;Jones, Chris" .send End With End Sub The problem is with the "newmessage" object. I apparently don't have the syntax or construct right for this because it stops on the "Set newmessage =...." statement. Any suggestions????? Dennis |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VB Extensibility library and "late binding" | Excel Discussion (Misc queries) | |||
EARLY binding or LATE binding ? | Excel Programming | |||
DAO Late Binding? | Excel Programming | |||
Early vs Late Binding - Word | Excel Programming | |||
DAO objects with late binding in Excel? | Excel Programming |