Outlook 2010 Sende Script (Abfrage von welchem Absender - BCC inkludiert) zusammenführen
Ich habe bereits 2 Abfragen für VB und möchte die aber zusammenführen
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
On Error GoTo Err001
Dim objItem As Outlook.MailItem
If Item.Class = olMail Then
If MsgBox("E-Mail als 'Support' versenden?", vbYesNo) = vbYes Then
Set objItem = Item.Copy
objItem.SentOnBehalfOfName = "support@service4work.com"
objItem.Send
Item.Delete
Cancel = True
End If
End If
Exit Sub
Err001:
MsgBox "Ein Fehler ist beim E-Mail Versand aufgetreten!"
End Sub
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim objMe As Recipient
Set objMe = Item.Recipients.Add("addresse@domain.com")
objMe.Type = olBCC
objMe.Resolve
Set objMe = Nothing
End Sub
Wie schaffe ich es dass wenn auf Ja gedrückt wird dass auch nur dann an BCC fix geschickt wird?
Geht das in einem Script?
Wenn nein gedrückt wird soll ganz normal gesendet werden, ohne BCC und ohne Spezial VON.
Sorry wegen der Formatierung, ich habe nicht herausgefunden wie man das ordentlich darstellen kann.
Danke
Lg
On Error GoTo Err001
Dim objItem As Outlook.MailItem
If Item.Class = olMail Then
If MsgBox("E-Mail als 'Support' versenden?", vbYesNo) = vbYes Then
Set objItem = Item.Copy
objItem.SentOnBehalfOfName = "support@service4work.com"
objItem.Send
Item.Delete
Cancel = True
End If
End If
Exit Sub
Err001:
MsgBox "Ein Fehler ist beim E-Mail Versand aufgetreten!"
End Sub
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim objMe As Recipient
Set objMe = Item.Recipients.Add("addresse@domain.com")
objMe.Type = olBCC
objMe.Resolve
Set objMe = Nothing
End Sub
Wie schaffe ich es dass wenn auf Ja gedrückt wird dass auch nur dann an BCC fix geschickt wird?
Geht das in einem Script?
Wenn nein gedrückt wird soll ganz normal gesendet werden, ohne BCC und ohne Spezial VON.
Sorry wegen der Formatierung, ich habe nicht herausgefunden wie man das ordentlich darstellen kann.
Danke
Lg
Please also mark the comments that contributed to the solution of the article
Content-Key: 204983
Url: https://administrator.de/contentid/204983
Printed on: April 26, 2024 at 03:04 o'clock
2 Comments
Latest comment
Hallo Transministrator,
Zu deiner Frage der Formatierungen hier im Forum :
Formatting instructions in the posts
Grüße Uwe
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
On Error GoTo Err001
Dim objItem As Outlook.MailItem
If Item.Class = olMail Then
If MsgBox("E-Mail als 'Support' versenden?", vbYesNo) = vbYes Then
Set objItem = Item.Copy
objItem.SentOnBehalfOfName = "support@service4work.com"
Dim objMe As Recipient
Set objMe = objItem.Recipients.Add("addresse@domain.com")
objMe.Type = olBCC
objMe.Resolve
objItem.Send
Item.Delete
Cancel = True
Else
Cancel = False
End If
End If
Exit Sub
Err001:
MsgBox "Ein Fehler ist beim E-Mail Versand aufgetreten!"
End Sub
Zu deiner Frage der Formatierungen hier im Forum :
Formatting instructions in the posts
Grüße Uwe