M
Martin Los
I have code that checks whether I have introduced text in
the "From" part of an email (I use different mailboxes).
It works fine if I use Ourtlook alone. But with Word as
emaileditor it gives problems
Problems encountered:
- The MsgBox doesn´t appear vbModal
- Security check to check sendername (with what specific
code can I use redemption?) (this also happens when only
using Outlook!)
Thanks for help!
Martin
'CODE
Private Sub Application_ItemSend(ByVal Item As Object,
Cancel As Boolean)
Dim olApp As Outlook.Application
Dim olMail As MailItem
Set olApp = New Outlook.Application
Set olMail =
Outlook.Application.ActiveInspector.CurrentItem
If olMail.Sendername = "" Then
MsgBox "Introduce mailbox name where email was
received in ""From""", vbInformation +
vbSystemModal, "Input From"
Cancel = True
End If
Set olMail = Nothing
Set olApp = Nothing
End Sub
the "From" part of an email (I use different mailboxes).
It works fine if I use Ourtlook alone. But with Word as
emaileditor it gives problems
Problems encountered:
- The MsgBox doesn´t appear vbModal
- Security check to check sendername (with what specific
code can I use redemption?) (this also happens when only
using Outlook!)
Thanks for help!
Martin
'CODE
Private Sub Application_ItemSend(ByVal Item As Object,
Cancel As Boolean)
Dim olApp As Outlook.Application
Dim olMail As MailItem
Set olApp = New Outlook.Application
Set olMail =
Outlook.Application.ActiveInspector.CurrentItem
If olMail.Sendername = "" Then
MsgBox "Introduce mailbox name where email was
received in ""From""", vbInformation +
vbSystemModal, "Input From"
Cancel = True
End If
Set olMail = Nothing
Set olApp = Nothing
End Sub