Warning message


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 o
the web the following script to avoid sending e-mails with no subject:
Private Sub Application_ItemSend(ByVal Item As Object, Cancel A
Boolean)
Dim strSubject As String
strSubject = Item.Subject
If Len(strSubject) = 0 Then
Prompt$ = "Subject not present, continue?"
If MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Chec
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-mai
without attachment to more then, let’s say, 8 addresses. The idea i
that when I send an e-mail to several recipients I usually have t
attach something, so this would be a valuable warning to avoi
forgetting it.

Can you help?

Thanks,

To
 
Ad

Advertisements

M

Michael Bauer [MVP - Outlook]

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 - MVP Outlook
Category Manager - Manage and share your categories:
SAM - The Sending Account Manager:
<http://www.vboffice.net/product.html?lang=en>


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

Advertisements

T

Thomy

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

Thanks again.

Tom

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

--
Best regards
Michael Bauer - MVP Outlook
Category Manager - Manage and share your categories:
SAM - The Sending Account Manager:
http://www.vboffice.net/product.html?lang=en
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top