![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
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 |