![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]() 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 http://forums.slipstick.com |
Ads |
#2
|
|||
|
|||
![]()
Add another If ... End If block to check the value of Item.Recipients.Count.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Thomy" wrote: 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 http://forums.slipstick.com . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
No Attachment Warning - VBA Code HELP | fruitchunk | Outlook and VBA | 1 | March 15th 10 09:03 AM |
outlook 2000 SP3 attachment warning message | Jim Wray | Outlook - General Queries | 0 | August 18th 07 05:20 PM |
Wahy to turn off attachment warning in Outlook 2007 | Tom | Outlook - General Queries | 4 | May 12th 07 12:46 PM |
How to turn off attachment warning | Tom | Outlook - General Queries | 3 | March 23rd 07 09:52 PM |
Attachment Security Warning | Ibentusa | Outlook - Installation | 1 | June 8th 06 03:24 PM |