How about something like this ...
Dim objOutlook as Object
Dim objOutlookEmail as Object
Dim objOutlookAttachments as Object
Sub Outlook(strSubject$, strTo$, strBody$, strAttachment$)
Set objOutlook = CreateObject("Outlook.Application"

Set objOutlookEmail = objOutlook.CreateItem(OlMailItem)
objOutlookEmail.Subject = strSubject
objOutlookEmail.Body = strBody
objOutlookEmail.To = strTo
Set objOutlookAttachments = objOutlookEmail.Attachments
objOutlookAttachments.Add strAttachment
objOutlookEmail.Display
objOutlookEmail.Send
Set objOutlook = Nothing
Set objOutlookEmail = Nothing
Set objOutlookAttachments = Nothing
End Sub
You'll notice that the function requires some parameters to be passed to it. Here is a list of the variables that will need to be set.
strSubject - Subject text for the email.
strTo - The distribution list to send the email to. Use a semicolon as a seperator - ";" for multiple addresses.
strBody - Body text for the email.
strAttachment - A file to attach to the email.
objOutlook - Used to reference the Outlook Object Model.
objOutlookEmail - The Email Object.
objOutlookAttachments - The attachments collection.
Hope this helps.
Flex