Hi,

I'm currently trying to write a macro to send e-mails via Outlook using info in Excel. The following syntax used to work fine but I no longer have access to Outlook and need to re-write the macro to enable my procedure to use Groupwise instead :

Dim OutlookApp As New Outlook.Application
Dim OutMail As Outlook.MailItem

Sheets("Menu").Select
Application.ScreenUpdating = False
Application.StatusBar = "E_Mailing RFQs to Suppliers ..."
Sheets("DailyRFQs").Select

Set OutApp = CreateObject("Outlook.Application")

' On Error GoTo cleanup

For Each VCODE In Range("VCODE")

' If VCODE.Offset(0, 5).Value = "Y" Then

Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.To = VCODE.Offset(0, 2).Value
.Subject = "RFQ: " & VCODE.Offset(0, 12).Value & " - " & VCODE.Value & " " & VCODE.Offset(0, 1).Value
.Body = vbNewLine & vbNewLine & _
"Dear " & VCODE.Offset(0, 3).Value & "," & vbNewLine & vbNewLine & _
"Body Text"
.Attachments.Add VCODE.Offset(0, 7).Value
.Attachments.Add VCODE.Offset(0, 8).Value
.Attachments.Add VCODE.Offset(0, 9).Value
.Attachments.Add VCODE.Offset(0, 11).Value
.Send 'Or use Display
.Display
VCODE.Offset(0, 9).Value = "YES"
End With
Set OutMail = Nothing
Else

VCODE.Offset(0, 9).Value = "NO"

End If

Next

cleanup:
Set OutApp = Nothing
Application.ScreenUpdating = True

End Sub


Any help would be greatly appreciated.

Greg Maloney
[email protected]