Subject Line

G

Guest

How do I get MS Outlook to prompt me for a subject line? I seem to be
forgetting to write one in and Outlook used to prompt me before sending.
 
S

Sue Mosher [MVP-Outlook]

There is no such feature, but you can build it in with a little VBA code:

Private Sub Application_ItemSend _
(ByVal Item As Object, Cancel As Boolean)
If Item.Subject = "" Then
Cancel = True
MsgBox "Please fill in the subject before sending.", _
vbExclamation, "Missing Subject"
End If
End Sub

For a more elaborate version that also checks for expected attachments, see
http://www.outlookcode.com/codedetail.aspx?id=553
 
G

Guest

Here are the steps
1. Open your outlook
2. Press Alt+F11. This opens the Visual Basic editor
3. On the Left Pane, one can see "Microsoft Outlook Objects", expand
this. Now one can see the "ThisOutLookSession".
4. Click on "ThisOutLookSession".
5. Copy and Paste the following code in the right pane.(Code Pane)

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 is Empty. Are you sure you want to send the Mail?"
If MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground,
"Check for Subject") = vbNo Then
Cancel = True
End If
End If
End Sub

Save this and now close the VB Code editor and take a breath. From now on,
this macro will make sure you do not make the mistake of sending a mail
without subject.

NOTE: This will work for the current session of Outlook only. in simple
words if you close your outlook and open it again then you have to redo the
steps. I hope this will help.

RajeshV
 
G

Guest

Great!! - this was just what I was looking for - but strange and rather
annoying that the feature is not standard in Outlook.
Do you rally have to run the macro manually every time you open Outlook?
I know you can make a macro run automatically when opening Excel
spreadsheets, so it must be possible in Outlook as well - or??

/NSV
 
R

Roady [MVP]

Your post doesn't make much sense if you don't quote the original issue and
solution.
 
G

Guest

Why should I? My comment attachs to the original issue where you can see what
it was in the beginning. All this quoting just makes the space uptake grow
exponentially.


Roady said:
Your post doesn't make much sense if you don't quote the original issue and
solution.

--
Robert Sparnaaij [MVP-Outlook]
Coauthor, Configuring Microsoft Outlook 2003


-----

nsv said:
Great!! - this was just what I was looking for - but strange and rather
annoying that the feature is not standard in Outlook.
Do you rally have to run the macro manually every time you open Outlook?
I know you can make a macro run automatically when opening Excel
spreadsheets, so it must be possible in Outlook as well - or??

/NSV
 
G

Guest

Oh - I thought I had found the smart solution, but it worked only once. Now I
can't run any macros in Outlook. Do you have a hint as to why?

/NSV
 
G

Gordon

nsv said:
Why should I? My comment attachs to the original issue where you can see
what
it was in the beginning. All this quoting just makes the space uptake grow
exponentially.

Firstly, many of the regulars here do NOT use the horrible web interface
that you are using, they use a news reader and so don't see the same "view"
that you do. You would be highly recommended to do the same, as it has many
benefits over the web interface.
Secondly you don't necessarily need to quote ALL the post you are replying
to, just the relevant part.
And thirdly, this news group is replicated over many many servers globally
and sometimes posts don't get passed on. Therefore it is only courtesy to
quote so that people reading this group from non-Microsoft servers do not
miss pertinent parts of the thread.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top