I'm using this in Excel to automate building & sending emails using info
from the worksheet.
If I create the object at the start of the code, I get a Run-time
error -2044460790 (8624010a); Automation error
the only documentation I could find was :
http://support.microsoft.com/default.aspx?scid=kb;en-us;186063
and it did not have the error code listed.
Enviro: Outlook XP, WinXP, Office XP.
Thank you for your help!
------ code in workbook module-------
Option Explicit
Dim ol, MailSendItem, olns, olMailItem
Dim today As Date
Dim emlSubj, emlBody, emlAttach
Dim emlFile, emlTrack, emlRecip
Dim emlBodyUSPS, emlBodyUPS
Dim numRows, StartingRow, LastRow As Integer
Dim i As Integer
Dim goDebug As Integer
Sub ShipNotificationEmail()
numRows = ActiveSheet.UsedRange.Rows.Count
StartingRow = 3
LastRow = numRows - StartingRow
For i = StartingRow To LastRow ' Loop through the all the
populated rows
If Range("N" & i) <> "" Then ' only send email if there is
something in the tracking number area
emlTrack = UCase(Range("N" & i).Value)
'MsgBox "Tracking is " & emlTrack
emlBody = emlBodyUPS
emlBodyUPS = "Your order has been shipped." & vbCrLf & vbCrLf & "The UPS
tracking number for this purchase is:" _
& vbCrLf & vbCrLf & emlTrack & vbCrLf & vbCrLf & "If shipped via UPS,
this number may take up to" & vbCrLf & vbCrLf & _
"12 hours to become active in their online system." & vbCrLf & vbCrLf &
_
"We do not guarantee shipping times, this is dependant" & vbCrLf &
vbCrLf & _
"on the shipping company. Please check with the specific company for
details." & vbCrLf & vbCrLf & _
"Thank you for your purchase," & vbCrLf & "Tek Recycle" & vbCrLf &
vbCrLf & _
"www.tekrecycle.com"
emlBodyUSPS = "Your order has been shipped." & vbCrLf & vbCrLf & _
"We do not guarantee shipping times, this is dependant" & vbCrLf &
vbCrLf & _
"on the US Postal Service. Please check with your local Postal location
for details." & vbCrLf & vbCrLf & _
"Thank you for your purchase," & vbCrLf & "Tek Recycle" & vbCrLf &
vbCrLf & _
"www.tekrecycle.com"
emlSubj = "eBay: Item #" & Range("B" & i).Value & " - Shipping
Notification"
emlRecip = Range("I" & i).Value
If emlTrack = "USPS" Then emlBody = emlBodyUSPS
'MsgBox "Send: " & emlRecip & vbCrLf & vbCrLf & vbCrLf & _
"Subject: " & vbCrLf & emlSubj & vbCrLf & vbCrLf & "Message Text: " & vbCrLf
& vbCrLf & emlBody
Set ol = CreateObject("Outlook.Application")
Set MailSendItem = ol.CreateItem(olMailItem)
Set olns = ol.GetNamespace("Mapi")
With MailSendItem
.To = emlRecip
.Subject = emlSubj
.Body = emlBody
' .Display
.Send
End With
End If
Next i
End Sub
Take a look here for more info:-
http://www.dimastr.com/redemption/
Hope that helps,
Dan
"ltek" <ltekco...@hotmail.com> wrote in message
news:#bBd71rvCHA.1960@TK2MSFTNGP11...
Any ideas?
thanks!
"Daniel Klann" <danie...@hotmail.com> wrote in message
news:#AUoOKtvCHA.2380@TK2MSFTNGP12...
Here is a related link:
Outlook Email Security Update
http://www.slipstick.com/outlook/esecup.htm
"ltek" <ltekco...@hotmail.com> wrote in message
news:e8YefqwvCHA.2544@TK2MSFTNGP11...
Can anyone help me fix that first before I try using the Redemption DLL.
thanks!
"ltek" <ltekco...@hotmail.com> wrote in message
news:e8YefqwvCHA.2544@TK2MSFTNGP11...
"ltek" <ltekco...@hotmail.com> wrote in message news:e8YefqwvCHA.2544@TK2MSFTNGP11...