Warning message

Status
Not open for further replies.
T

Thomy

Hello.

I am trying to personalize my Outlook to avoid sending useless e-mails.

For instance, since I have no knowledge of Visual Basic, I have found on

the web the following script to avoid sending e-mails with no subject:

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As

Boolean)

Dim strSubject As String

strSubject = Item.Subject

If Len(strSubject) = 0 Then

Prompt$ = "Subject not present, continue?"

If MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Check

for Subject") = vbNo Then

Cancel = True

End If

End If

End Sub

It works fine. Now I would like something different:

I would like a similar warning when I am trying to send an e-mail

without attachment to more then, let’s say, 8 addresses. The idea is

that when I send an e-mail to several recipients I usually have to

attach something, so this would be a valuable warning to avoid

forgetting it.

Can you help?

Thanks,

Tom

Thomy
 
For that use the same event. See the Item.Attachments collection, if its

Count property is 0, there's no attachment.

Best regards

Michael Bauer

Am Mon, 10 May 2010 13:31:19 +0100 schrieb Thomy:


> Hello.

> I am trying to personalize my Outlook to avoid sending useless e-mails.
> For instance, since I have no knowledge of Visual Basic, I have found on
> the web the following script to avoid sending e-mails with no subject:
> Private Sub Application_ItemSend(ByVal Item As Object, Cancel As
> Boolean)
> Dim strSubject As String
> strSubject = Item.Subject
> If Len(strSubject) = 0 Then
> Prompt$ = "Subject not present, continue?"
> If MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Check
> for Subject") = vbNo Then
> Cancel = True
> End If
> End If
> End Sub

> It works fine. Now I would like something different:
> I would like a similar warning when I am trying to send an e-mail
> without attachment to more then, let’s say, 8 addresses. The idea is
> that when I send an e-mail to several recipients I usually have to
> attach something, so this would be a valuable warning to avoid
> forgetting it.

> Can you help?

> Thanks,

> Tom
 
Thank you Michael.

I can guess that the logic to use is the one you have suggested. The

problem is that, with no programming knowledge, I lack the right

syntax.

Is someone willing to compose something for me?

Thanks again.

Tom

'Michael Bauer [MVP - Outlook Wrote:
> ;348672']For that use the same event. See the Item.Attachments
> collection, if its
> Count property is 0, there's no attachment.

> > Best regards
> Michael Bauer
> Category Manager -

> SAM - The Sending Account Manager:
> http://www.vboffice.net/product.html?lang=en
>


Thomy
 
You might also look on www.slipstick.com. There're are ready-to-use Addins

for that available.

Best regards

Michael Bauer

Am Tue, 11 May 2010 10:26:59 +0100 schrieb Thomy:


> Thank you Michael.
> I can guess that the logic to use is the one you have suggested. The
> problem is that, with no programming knowledge, I lack the right
> syntax.
> Is someone willing to compose something for me?

> Thanks again.

> Tom

> 'Michael Bauer [MVP - Outlook Wrote:
> > ;348672']For that use the same event. See the Item.Attachments
> > collection, if its
> > Count property is 0, there's no attachment.
>

>> > > Best regards
> > Michael Bauer
> > Category Manager -

> > SAM - The Sending Account Manager:
> > http://www.vboffice.net/product.html?lang=en
> >
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
Diane Poremsky Meeting Location Warning Message Using Outlook 0
L Location Unsafe Warning for Links Using Outlook 1
T External email warning banner Outlook VBA and Custom Forms 0
C WARNING - DO NOT USE AN OUTLOOK.COM ADDRESS FOR GOOGLE ACCOUNT RECOVERY EMAIL Using Outlook 10
A Warning When Opening attachment Using Outlook 7
M warning for too many appointments on a same day in Outlook Using Outlook 1
J Customize Attachement Security Warning Using Outlook 1
D Conflict warning while editing Exchange Server Administration 0
Diane Poremsky Disable the Unsafe Hyperlink Warning when Opening Attachments Using Outlook 0
Jack Poore Outlook gives warning using GO Contracts Sync Mod Using Outlook 4
M Rule to pop a warning dialogue on certain actions Using Outlook 1
Rory Campion Not getting a warning when a shared calendar item has been updated by someone else Using Outlook 2
B How do I get a warning before deleting e-mail messages? Using Outlook 2
J Disable outlook 2010 no-subject warning Using Outlook 4
E Disable outlook 2010 no-subject warning Using Outlook 9
T Missing attachment warning Outlook VBA and Custom Forms 1
F No Attachment Warning - VBA Code HELP Outlook VBA and Custom Forms 1
T How to get MailItem.Body without security warning in Outlook 2010 Outlook VBA and Custom Forms 2
H How turn off outlook security warning dialog box from outlook Outlook VBA and Custom Forms 1
P Stopping that security warning Outlook VBA and Custom Forms 1
1 Warning messege Outlook VBA and Custom Forms 3
E PgUp and PgDn don't work for displayed message content (but do for web pages) Using Outlook 3
M A plug in (or method) to keep email message formatting after it expires Using Outlook 1
Rob Can't save MailItem because the message changed in .pst file Outlook VBA and Custom Forms 0
M Search message, then (1) Jump to folder & (2) Select message that you searched for Outlook VBA and Custom Forms 7
Kika Melo How to mark as Junk any message not from Contacts (in Outlook.com) Using Outlook 3
G Outlook 365 My iCloud Outlook doesn’t work after reinstalling Microsoft365 on Windows 10 PC – now I get error message on contacts and calendar Using Outlook 1
G Get current open draft message body from VBA Outlook VBA and Custom Forms 1
E Outlook 365 Save Selected Email Message as .msg File - oMail.Delete not working when SEARCH Outlook VBA and Custom Forms 0
HarvMan Outlook 365 - Rule to Move an Incoming Message to Another Folder Using Outlook 4
F Outlook 2019 Forwarding Message and Keeping Unread Status Outlook VBA and Custom Forms 0
E Save Selected Email Message as .msg File - digitally sign email doesn't works Outlook VBA and Custom Forms 1
C Populate form data into message body Outlook VBA and Custom Forms 1
J Outlook 365 Add keywords from Listbox to the message body where cursor is placed Outlook VBA and Custom Forms 0
B How to create a button that sorts and selects the most recent message with ONE click Using Outlook 2
P "Item could not be moved" message occurs frequently for IMAP inbox, Office 365 Using Outlook 0
A rule name into message - how? Outlook VBA and Custom Forms 5
A Links in email getting error message about group policy Using Outlook 4
O How to find and replace a word in Outlook-Agenda-Subject and Message? Using Outlook 0
X Open Hyperlinks in an Outlook Email Message (Help with Diane's solution) Outlook VBA and Custom Forms 3
Commodore Unable to move message Using Outlook 3
Y Disable Microsoft Outlook Test Message Using Outlook 4
S Unable to change Message Class Outlook VBA and Custom Forms 0
S Changing Message Class Outlook VBA and Custom Forms 4
Cathy Rhone Mail merge error message Using Outlook 1
C Can't Locate an Unread Message in my Outlook view pane Using Outlook 0
G Send a greeting message to a contact on birthday Outlook VBA and Custom Forms 5
B Inconsistent handling of message read/unread status by Outlook Using Outlook 3
N Save Selected Email Message as .msg File Outlook VBA and Custom Forms 12
T Macro to move reply and original message to folder Outlook VBA and Custom Forms 6

Similar threads

Back
Top