Here is the code. As I mentioned, this is in Microsoft's Integration Manager
app for Great Plains. Written as a script, using the VBScript examples from
your FAQ section on the Redemption Object site. It is Integration Manager
9.0, associated with Great Plains 9.0, running on a Windows 2000 Server
machine, with Outlook 2003 (sp2)
Dim rMail
Dim oItem
Dim ns
'Dim Sync
'Create the Redemption Object to be used in this program
Set rMail = CreateObject("Redemption.SafeMailItem") 'New
Set oItem = Application.CreateItem(0)
rMail.Item = oItem
MsgBox (" passed by create Object - Outlook app")
' Testing against my email address
rmail.recipients.Add "
[email protected]"
rmail.recipients.ResolveAll
MsgBox ("passed mail item to: ")
' Create the body of the email
strmessage = "Your GL batch " & BatchID & " was loaded successfully.
" & VbCrLf & VbCrLf _
& "Date Loaded: " & Date() & Space(5) & "Time Loaded: " & Time()
& VbCrLf & VbCrLf _
' Create the Subject
strsubject = (" " & CO & " Using Outlook: Trial Balance Has Been Imported
& Posted to Great Plains Successfully")
MsgBox ("passed by mail message content ")
' Set the message and subject
rmail.subject = strsubject
rmail.body = strmessage
MsgBox ("passed the body and subject lines")
'Send the e-mail
rmail.Send
--The error returned is "Object Required 'Application'" Occurring where I
use Application.CreateItem(0) to create the oItem.