D
Dinesh
hello everybody,
Iam using the below code to check whether the subject is empty when sending
mail in VB.NET office outlook add-in.
Private Sub Application_ItemSend(ByVal Item As Object, ByRef Cancel As
Boolean) Handles Application.ItemSend
Dim sendmessage As Integer
If Item.class = Outlook.OlObjectClass.olMail Then
If Item.subject = "" Then
sendmessage = MessageBox.Show("subject missing", "new",
MessageBoxButtons.OKCancel, MessageBoxIcon.Error,
MessageBoxDefaultButton.Button1, MessageBoxOptions.RightAlign, False)
'MsgBox("subject text", MsgBoxStyle.DefaultButton1, "subject
missing")
If sendmessage = vbNo Then
Cancel = True
Item.Display()
End If
End If
End If
End Sub
but even when i send the empty mail without subject then it is not showing
the message box.could anyone help me ?
|Thank you
Iam using the below code to check whether the subject is empty when sending
mail in VB.NET office outlook add-in.
Private Sub Application_ItemSend(ByVal Item As Object, ByRef Cancel As
Boolean) Handles Application.ItemSend
Dim sendmessage As Integer
If Item.class = Outlook.OlObjectClass.olMail Then
If Item.subject = "" Then
sendmessage = MessageBox.Show("subject missing", "new",
MessageBoxButtons.OKCancel, MessageBoxIcon.Error,
MessageBoxDefaultButton.Button1, MessageBoxOptions.RightAlign, False)
'MsgBox("subject text", MsgBoxStyle.DefaultButton1, "subject
missing")
If sendmessage = vbNo Then
Cancel = True
Item.Display()
End If
End If
End If
End Sub
but even when i send the empty mail without subject then it is not showing
the message box.could anyone help me ?
|Thank you