?
Solved

Outlook Blank Subject Field

Posted on 2004-09-20
6
Medium Priority
?
598 Views
Last Modified: 2012-06-27
I need to retrict Outlook from allowing a blank subject to be sent and have located a similar issue answered in Experts Exchange, confirming inserting the following code after pressing ALT & F11. However ALT & F11 opens a blank Visual Basic screen and I am not sure how to complete the process from here. Alternatively is there a simpler way of achieving the same result?

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    If Len(Item.Subject & vbNullString) = 0 Then
        MsgBox "Please enter a Subject"
        Cancel = True
    End If
End Sub

0
Comment
Question by:itcroydon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 33

Expert Comment

by:sajuks
ID: 12100628
Open VBA editor (AltF11)
expand Project1
expand Microsoft Outlook Objects
Expand thisOutlookSession

//Paste the code
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
   If Item.Subject = "" Then
       MsgBox "You forgot the subject."
       Cancel = True
   End If
End Sub

When you close Outlook accept to save the Outlook Project or press Ctrl+S and the restart Outlook.

To run the script you may need to set the macro security lower.
0
 
LVL 1

Author Comment

by:itcroydon
ID: 12100674
How do i expand project one? Project 1 shows on the title bar of the Visual Basic screen but apart from that, the menu bar and the toolbar I have a completely black screen.
0
 
LVL 33

Expert Comment

by:sajuks
ID: 12100688
Thats cos you dont have any other macros in it.
You should be something like
Project 1 ()
 - Microsoft office olook Obj
  -- ThisOutlooksession

on the left pane and nothing in the right pane.
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 33

Expert Comment

by:sajuks
ID: 12100691
Copy and paste the code in the right pane after selecting the ThisOutlooksession
0
 
LVL 1

Author Comment

by:itcroydon
ID: 12100833
Sorry, I have never used Visual Basic before so please bear with me.

There is nothing on the screen below the toolbar, no panes at all just a completely black screen. i.e.

Title bar shows - Microsoft Visual Basic Project 1
Menu Bar shows - File, Edit etc.
Toolbar - view Outlook, show user form, save buttons etc.
Below the toolbar the rest of the screen is completely black

For reference I am using Outlook 2002, Windows XP Pro & Visual Basic 6.3.
0
 
LVL 33

Accepted Solution

by:
sajuks earned 2000 total points
ID: 12100886
Press Ctrl+R or go to
View > Project Explorer
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
This article will help to fix the below error for MS Exchange server 2010 I. Out Of office not working II. Certificate error "name on the security certificate is invalid or does not match the name of the site" III. Make Internal URLs and External…
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question