Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Outlook Blank Subject Field

Posted on 2004-09-20
6
Medium Priority
?
601 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
  • 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
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

In this article I discuss my selections of the Top Four free Outlook OST File Viewers available. Open, view and read even damaged OST files by using these tools. They all provide a clear preview of all data such as emails, notes, tasks, calendars, e…
There can be many situations demanding the conversion of Outlook OST files to PST format and as such, there is no shortage of automated tools to perform this conversion. However, what makes Stellar OST to PST converter stand above the rest? Let us e…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

773 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