Until now i've used the following function to create a new mail message and add an attachment to it:
Function Attach_fraud_notif(filename As String, tolist As String, message As String, subj As String)
Set myOlApp = CreateObject("Outlook.Application"
Set myitem = myOlApp.CreateItem(olMailItem)
myitem.Display
myitem.subject = subj
myitem.To = tolist
myitem.body = message
Set Myattachments = myitem.Attachments
If filename <> "" Then
Myattachments.Add filename, _
olByValue, Len(message) + 1
End If
End Function
But now i would like to insert an object in the mail instead of an attachment.
Any ideas on the syntax would be appreciated.
Boardy.
Function Attach_fraud_notif(filename As String, tolist As String, message As String, subj As String)
Set myOlApp = CreateObject("Outlook.Application"
Set myitem = myOlApp.CreateItem(olMailItem)
myitem.Display
myitem.subject = subj
myitem.To = tolist
myitem.body = message
Set Myattachments = myitem.Attachments
If filename <> "" Then
Myattachments.Add filename, _
olByValue, Len(message) + 1
End If
End Function
But now i would like to insert an object in the mail instead of an attachment.
Any ideas on the syntax would be appreciated.
Boardy.