|
-
Feb 18th, 2002, 12:15 AM
#1
sending emails from VB
I am using the MSOUTL9.dll and am trying to send emails via an in-house VB 6 application.
However since the SP1 upgrade to Outlook It now displays two dialog boxes before sending a message.
The boxes appear on the set m_oOLMailItem
and on the .SEND lines
I have been told tha a com add-in might be a work around. Does anyone know and if so can they point me in the right direction.
Thanks heaps
Full code is
Public Function Send(sListNames As String, sSubject As String, sBody As String) As Long
Dim sAddresses() As String
Dim lRecip As Long
Dim sPath As String, sName As String
On Error Resume Next
'check that email is enabled for this List
If Len(sListNames) = 0 Then Exit Function
'Check email list Enabled flag
'Set m_oOLMailItem = m_oOLApp.CreateItem(olMailItem)
With m_oOLMailItem
.Subject = sSubject
'Set list of recipients & resolve (list is semicolon-delimited)
sAddresses = Split(sListNames, ";")
For lRecip = 0 To UBound(sAddresses, 1)
.Recipients.Add sAddresses(lRecip)
Next
'.Recipients.ResolveAll
.Send
End With
'return any error code that occurs (0=success)
Send = Err
End Function
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
|