title image


Smiley TIPP: Outlook Redemption mit Attachment
Also bei mir klappt das problemlos:



Public Sub SendWithRedemptionAttachment( _

Optional SendTo = "Test@Kraasch.net", _

Optional Subject = "dies ist ein test", _

Optional Body = "und dies die nachricht", _

Optional Att = "I:\samples\test.xls")



Dim olItem As Outlook.MailItem, olApp As Outlook.Application, _

SafeMail As Redemption.SafeMailItem, isOpen As Boolean

On Error Resume Next



isOpen = True

Set olApp = GetObject(, "Outlook.Application")

If olApp Is Nothing Then

isOpen = False

Set olApp = CreateObject("Outlook.Application")

End If

On Error GoTo 0



Set SafeMail = CreateObject("Redemption.SafeMailItem") 'Create an instance of Redemption.SafeMailItem

Set olItem = olApp.CreateItem(olMailItem)

SafeMail.item = olItem

With SafeMail

.Recipients.Add SendTo 'Adresse

.Subject = Subject 'Betreff

.Body = Body 'Textkörper

.Attachments.Add Att

.Send

End With



Ex:

On Error Resume Next

Set olItem = Nothing

Set SafeMail = Nothing

If Not isOpen Then

olApp.Quit

Set olApp = Nothing

End If

Exit Sub



Er:

MsgBox "SendWithRedemption: " & Err & " " & Err.Description

GoTo Ex

End Sub





Gruß aus dem Norden
Reinhard


Bitte immer die Access-Version angeben!
DB-Wiki


Wie man Fragen richtig stellt

YaccessAccess-FAQUnd ansonsten: Wikipedia




geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: