- Worldstart's Tech Tips And Computer Help - http://www.worldstart.com -
Warning for No Subject in Microsoft Outlook 2007 Email
Posted By rupen On January 3, 2012 @ 6:43 PM In MS Office Help,MS Outlook | 10 Comments
Tony from North Carolina writes:
I have a question about Microsoft Outlook 2007. I think I inadvertently deleted the pop up that tells me that I forgot to name the subject. How to I restore this function?
By default, Microsoft Outlook 2007 does not provide a reminder for missing Subject Lines. However, you can create macro that provides this functionality in Microsoft Outlook 2007. Similar to other macros in Microsoft products, you will create the macro using Visual Basic (VB). I’ll provide the code and you’ll insert and save the code in the Microsoft Visual Basic Editor. Before you create Macro, you’ll need to check the Macro Security settings. Let’s do that now.
Check and Enable the Macro Security Settings
Step 1: Launch Microsoft Outlook 2007.
Step 2: Click Tools > Macro > Security, as shown below.
Step 3: Select Warnings for all macros and then click the OK button.
Now, you’ll create a macro that reminds you to insert a Subject line before sending the email.
Create and Save the Macro
Step 1: Ensure Microsoft Outlook 2007 is open. On the keyboard, keep the Alt key pressed and then press the F11 key. Alternatively, click the Tools > Macro > Visual Basic Editor. The Microsoft Visual Basic Editor appears.
Step 2: Expand Project1 in the Project pane.
Step 3: Double-click ThisOutlookSession. The code pane appears.
Step 4: Copy the following code in the code pane.
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim strSubject As String
strSubject = Item.Subject
If Len(Trim(strSubject)) = 0 Then
Prompt$ = “You’ve left the Subject empty. Are you sure you want to send the Mail?“
If MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, “Check for Subject”) = vbNo Then
Cancel = True
Tip: The text in italics is the Warning message. You can customize it.
Step 5: To save this macro, click the Save icon and then close Microsoft Visual Basic Editor.
Step 5: Now, restart Microsoft Outlook 2007. Click the Enable Macros button at the following prompt.
Now test the macro. Restart Microsoft Outlook 2007 and attempt to send an email with a blank subject line. You should get a warning message, as shown below.
Article printed from Worldstart's Tech Tips And Computer Help: http://www.worldstart.com
URL to article: http://www.worldstart.com/warning-for-no-subject-in-microsoft-outlook-2007-email/