|
-
October 11th, 2009, 05:48 PM
#1
Outlook 429 error
Hi there
Im trying to create an app that send an email on button click, this only seems to work if outlook is closed.
As this app will only be used when outlook is already open, it's not of much use to me at the moment.
Error 429 shows when i click the send mail button: the code is as follow;
Private Sub Command1_Click()
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookAttach As Outlook.Attachment
' Create the Outlook session.
Set objOutlook = CreateObject("Outlook.Application")
' Create the message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
With objOutlookMsg
' Add the To recipient(s) to the message.
Set objOutlookRecip = .Recipients.Add("[email protected]")
objOutlookRecip.Type = olTo
' Set the Subject, Body, and Importance of the message.
.Subject = "New A99 Call"
.Body = Text3.Text
.Importance = olImportanceHigh 'High importance
' Resolve each Recipient's name.
For Each objOutlookRecip In .Recipients
objOutlookRecip.Resolve
Next
' Should we display the message before sending?
If DisplayMsg Then
.Display
Else
.Save
.Send
End If
End With
Set objOutlook = Nothing
End Sub
It's this line that seems to have the error: Set objOutlook = CreateObject("Outlook.Application")
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|