A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Help with prompting for a subject



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old April 26th 06, 04:08 PM posted to microsoft.public.outlook.program_vba
kaiser
external usenet poster
 
Posts: 8
Default Help with prompting for a subject

Hi

Can anyone please help me. I am trying to write a macro that does the
following.


When an email is opened (either a new email or a reply / forward) the
macro must check if there is content inthe subject line. If there is,
then it must do nothing but open the email ready for forward or reply,
however, if there is NO subject it must bring up a msgbox saying "No
Subject"


Can anyone help me with this? SOmeone the forum previously helped me
with the following code (which when opening an email, prompted you to
chose from one of five choices from a userform and would enter a
preassigned string inot the subject). Perhaps this code will help


Thnks!


under modules:


Private Sub Application_Startup()
Set m_colInspectors = Application.Inspectors
End Sub


under ThisOutlookSession:
Option Explicit
Private WithEvents m_colInspectors As Outlook.Inspectors
Private WithEvents CurrentInspector As Outlook.Inspector


Private Sub Application_Startup()
Set m_colInspectors = Application.Inspectors
End Sub


Private Sub CurrentInspector_Activate()
Dim oMail As Outlook.MailItem
If Len(UserForm1.SelectedSubject) Then
Set oMail = CurrentInspector.CurrentItem
oMail.Subject = UserForm1.SelectedSubject
End If
Set CurrentInspector = Nothing
End Sub


Private Sub m_colInspectors_NewInspector(ByVal Inspector As
Outlook.Inspector)
If TypeOf Inspector.CurrentItem Is Outlook.MailItem Then
If Inspector.CurrentItem.EntryID = vbNullString Then
UserForm1.SelectedSubject = vbNullString
UserForm1.Show
Set CurrentInspector = Inspector
End If
End If
End Sub


and obbiously had the userform

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
No Subject Box I'm Old Greg Outlook - General Queries 3 April 15th 06 05:21 PM
Outlook prompting for Password Ismaelmvp3 Outlook - Using Forms 2 April 12th 06 04:11 PM
Setting Prompting for credentials in PRF Mike D. Outlook - General Queries 0 March 24th 06 10:39 PM
Hide Subject from others iblonger Outlook - Calandaring 4 February 25th 06 07:53 AM
Blank from and subject turboglide Outlook Express 2 January 14th 06 01:22 AM


All times are GMT +1. The time now is 09:23 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.