A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Warning message



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 10th 10, 02:31 PM
Thomy Thomy is offline
Junior Member
 
First recorded activity at Outlookbanter: May 2010
Posts: 2
Default Warning message

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
Ads
  #2  
Old May 11th 10, 10:45 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Warning message



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:

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

  #3  
Old May 11th 10, 11:26 AM
Thomy Thomy is offline
Junior Member
 
First recorded activity at Outlookbanter: May 2010
Posts: 2
Default

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

Quote:
Originally Posted by Michael Bauer [MVP - Outlook] View Post
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
  #4  
Old May 12th 10, 10:25 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Warning message



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

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

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CTRL+ENTER Sending Message Warning Senol Outlook - Using Contacts 1 February 5th 10 12:05 AM
ActiveX warning message when adding signature Zaur Bahramov Outlook - General Queries 5 July 4th 08 12:12 PM
Warning message rommel Outlook and VBA 1 December 1st 07 08:45 AM
outlook 2000 SP3 attachment warning message Jim Wray Outlook - General Queries 0 August 18th 07 05:20 PM
Warning message Bernardo Rezende Outlook and VBA 1 May 3rd 07 06:59 PM


All times are GMT +1. The time now is 08:57 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.