How to create a drop down user defined field that will appear on an inbox view

Status
Not open for further replies.

jozef

New Member
Outlook version
Outlook 2016 64 bit
Email Account
Exchange Server
Hi - on an inbox view, one can add existing fields such as "FROM" or add other existing fields such as "SENSITIVITY" that has as 4 drop down options: "Normal" "Personal" Private " and "Confidential"

I want to create a user defined field that acts like the field "SENSITIVITY" - for example, I want to create a field called "PROJECT" with predefined list of controlled five or six values in the drop down (Ex: "Project 1" "Project 2", "Project 3" , "Project 4", "Project 5").

Setting a user defined field as a "keyword" is the closest to what I am trying to do but it does not restrict the list of entries to a predetermined list of values to choose from. it is really free form and involves typing (a "Huge" effort I am trying to spare my users LOL..)

Obviously I could use the Category field but my users are using the Category field as they see fit and I want a field that is very restrictive in terms of list of values to tag each received email.

Also, I think this cannot be done by forms I think since the forms would apply to new emails created but I want to add this field to existing RECEIVED emails.

Maybe a macro that would "pop up" a mini-form with the new drop down field to have the user select the project...

Also Ideally this drop down should be multi-select. But even if it is feasible without a Multi-select, it would be a huge win!!!!

ANY HELP WOULD BE GREATLY APPRECIATED!!!!

THANKS
 
You would need to use a macro - you can not add that type of custom field to the view - it can show the value but not let you pick from a list of values.

How many people will be using it? If more than a handful, it would be better to do it as an addin.
 
Thanks!!... about eight people - Will try the macro route before.
Planning to use a user forms with a combobox that lists the project choices (Project 1...5) . Ideally would like this to work for not one, but multiple selected emails in the inbox view then launching the macro and applying the project value selected by the combo box in the userform that will pop up to all selected email to populate a new user defined field called PROJECT.

So assuming the the new User defined field to populate is PROJECT - this is what I came up with
Do you think this will work??????

For the user form:

Private Sub UserForm_Initialize()
With ComboBox1
.AddItem "Project 1"
.AddItem "Project 2"
.AddItem "Project 3"
.AddItem "Project 4"
.AddItem "Project 5"
.AddItem "Other"
End With
End Sub

Private Sub btnCommandButton1_Click()
lstNum = ComboBox1.ListIndex
Unload Me
End Sub
------------------------------------------------------------------------------------
For the Macro module

Public Sub MACRO111()
Dim currentExplorer As Explorer
Dim Selection As Selection
Dim obj As Object
Dim lstNum
Dim objProp As Outlook.UserProperty
Dim strPROJECT

Set currentExplorer = Application.ActiveExplorer
Set Selection = currentExplorer.Selection

UserForm1.Show

On Error Resume Next
For Each obj In Selection

Set objMail = obj
Select Case lstNum

Case 1
strPROJECT = "Project 1"
Case 2
strPROJECT = "Project 2"
Case 3
strPROJECT = "Project 3"
Case 4
strPROJECT = "Project 4"
Case 5
strPROJECT = "Project 5"
End Select

Set objProp = objMail.UserProperties.Add("PROJECT", olText, True)
objProp.Value = strPROJECT
objMail.Save

strDomain = Right(objMail.SenderEmailAddress, Len(objMail.SenderEmailAddress) - InStr(objMail.SenderEmailAddress, "@"))
Set objProp = objMail.UserProperties.Add("Domain", olText, True)
objProp.Value = strDomain
objMail.Save

Err.Clear
Next

Set currentExplorer = Nothing
Set obj = Nothing
Set Selection = Nothing
End Sub
 
I'll need to test it to be sure but it looks good just eyeballing it.
 
I have exactly the same question - I want to add a drop down list to the To Do list and have it work just like Priority currently does, i.e. when you click on the field, you are presented with pre-filled options (and you are NOT allowed to write your own text). You would then choose one of them - and if you don't click on the field, it simply defaults to your default option of choice. Please, hoping we can we find a way to get this kind of drop down field functionality other than by writing a VBA macro. For example, are there any other drop down fields (other than Priority) that exist in Outlook (that could be used in the To Do view even though they will have the wrong labels)? Or, can an existing Outlook text field or drop down field (other than Priority) be modified to turn it into a nice custom drop down field to use in the To Do view (e.g. can you rename the labels in an existing drop down field, like you can rename the name of the field)?
 
I'll need to test it to be sure but it looks good just eyeballing it.
Hi Lookout -- yes there is a field called "sensitivity" that has four drop down fields: Normal, Personal, Private and confidential... they are probably the wrong labels for you and to have a field with the right labels one will need to use a VBA macro to allow the user to select a correct label from a drop dow created in a user form..

Hi Diane,

I tested what is shown below (after creating PROEJCT as a user defined field) but ....it does not work - The User Form doe appears with the correct drop down to select a project label but... when I click on a project and then on the commandButton1 then nothing happens and the user defined field PROJECT is not populated with the selection

Do I have to do something so that when i click on commandButton1, the lstNum index is sent to the macro Module from the user form? Does lstNum need to be public after the unload Me command in the macro? Am I saving the correct value in PROJECT? THANKS

---------------------------------------------USERFORM
Private Sub UserForm_Initialize()
With ComboBox1
.AddItem "Project 1"
.AddItem "Project 2"
.AddItem "Project 3"
.AddItem "Project 4"
.AddItem "Project 5"
.AddItem "Other"
End With
End Sub

Private Sub CommandButton1_Click()
lstNum = ComboBox1.ListIndex
Unload Me
End Sub

-------------------------------------------------------------------Macro Module

Public Sub MACRO111()
Dim currentExplorer As Explorer
Dim Selection As Selection
Dim obj As Object
Dim objProp As Outlook.UserProperty
Dim strPROJECT As String
Dim lstNum As Integer

Set currentExplorer = Application.ActiveExplorer
Set Selection = currentExplorer.Selection

UserForm1.Show

On Error Resume Next

For Each obj In Selection
Set objMail = obj
Select Case lstNum
Case -1
strPROJECT = "No Project selected"
Case 1
strPROJECT = "Project 1"
Case 2
strPROJECT = "Project 2"
Case 3
strPROJECT = "Project 3"
Case 4
strPROJECT = "Project 4"
Case 5
strPROJECT = "Project 5"
End Select

Set objProp = objMail.UserProperties.Add("PROJECT", olText, True)
objProp.Value = strPROJECT
objMail.Save
Err.Clear
Next

Set currentExplorer = Nothing
Set obj = Nothing
Set Selection = Nothing
End Sub
 
I think lstNum is not transferred to the Module upon click of the button because if I put a MsgBox lstNum before
"Select Case lstNum" nothing is displayed - not properly declared or should I add an action upon click of the button?
 
OK Solved - and got it to work - All good - Code below to help or to improve (would like a multiselection of projects ideally_

Items that should have been in the code for the user forms were put in the Macro code

-----------------the Userform code that contains a combo box and a button is:


Private Sub UserForm_Initialize()
With ComboBox1
.AddItem "Project 1"
.AddItem "Project 2"
.AddItem "Project 3"
.AddItem "Project 4"
.AddItem "Project 5"
.AddItem "Other"
End With
End Sub
Private Sub CommandButton1_Click()
Dim currentExplorer As Explorer
Dim Selection As Selection
Dim obj As Object
Dim objProp As Outlook.UserProperty
Dim strPROJECT As String

Set currentExplorer = Application.ActiveExplorer
Set Selection = currentExplorer.Selection

lstNum = ComboBox1.ListIndex

For Each obj In Selection
Set objMail = obj

Select Case lstNum
Case -1
strPROJECT = "No Project selected"
Case 1
strPROJECT = "Project 1"
Case 2
strPROJECT = "Project 2"
Case 3
strPROJECT = "Project 3"
Case 4
strPROJECT = "Project 4"
Case 5
strPROJECT = "Project 5"
End Select

Set objProp = objMail.UserProperties.Add("PROJECT", olText, True)
objProp.Value = strPROJECT
objMail.Save
Err.Clear
Next

Unload Me
End Sub

_________________________________________The Macro Code is just as per below:


Public Sub MACRO111()
UserForm1.Show

Set currentExplorer = Nothing
Set obj = Nothing
Set Selection = Nothing

End Sub
 
I need to add a drop down rundown to the schedule and have it work very much like Priority right now does, for example whenever you click on the field, you are given pre-filled choices

party halls in chennai
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
C Cannot drag and drop or create folder in PST file folders Using Outlook 1
S Create Outlook Task from Template and append Body with Email Body Outlook VBA and Custom Forms 4
B Modify VBA to create a RULE to block multiple messages Outlook VBA and Custom Forms 0
J Want to create a button on the nav bar (module add-in) to run code Outlook VBA and Custom Forms 2
B How to create a button that sorts and selects the most recent message with ONE click Using Outlook 2
J PSA: How to create custom keyboard shortcut for "Paste Unformatted Text" in Outlook on Windows Outlook VBA and Custom Forms 1
W Create a Quick Step or VBA to SAVE AS PDF in G:|Data|Client File Outlook VBA and Custom Forms 1
Wotme create email only data file Using Outlook 1
S Outlook 365 Help me create a Macro to make some received emails into tasks? Outlook VBA and Custom Forms 1
Commodore Any way to create "from-only" account on Outlook 2021? Using Outlook 1
L Capture email addresses and create a comma separated list Outlook VBA and Custom Forms 5
N Can't create NEW GROUP and add/remove a member from existing Group in Outlook Using Outlook 1
NVDon Create new Move To Folder list Outlook VBA and Custom Forms 0
C Create Meeting With Custom Form Outlook VBA and Custom Forms 2
D Create advanced search (email) via VBA with LONG QUERY (>1024 char) Outlook VBA and Custom Forms 2
G Create ordinal numbers for birthday Outlook VBA and Custom Forms 2
O Outlook 365 - How to create / copy a new contact from an existing one? Using Outlook 5
D Create new email from the received Email Body with attachment Outlook VBA and Custom Forms 10
A How to create fixed signatures for aliases that process through GMAIL? Outlook VBA and Custom Forms 0
P Can I create a Rule that sends me an email when I get a Task? Using Outlook 2
M How create a Rule to filter sender's email with more that one @ sign Using Outlook 1
B Can I create a local PST file for SPAM on a drive that is usually disconnected? Using Outlook 3
Chiba Create an appointment for all the members Outlook VBA and Custom Forms 1
S Create a clickable custom column field Outlook VBA and Custom Forms 0
O Create a custom contact form - questions before messing things up... Outlook VBA and Custom Forms 4
L automaticaly create a teams meeting with a sync Using Outlook 0
D Can Exchange Admin Center create a pst for users email/contacts/calendar? Exchange Server Administration 0
S Create A Search Folder That Looks For Message Class? Outlook VBA and Custom Forms 0
F How to create phone number as links in notes of Contacts Using Outlook 2
Nessa Can't create new appointment Using Outlook 1
A Create date folder and move messages daily Outlook VBA and Custom Forms 1
C Create new Message with shared contacts & BCC'ing recipients Outlook VBA and Custom Forms 0
O Multiple email accounts - hesitate to create a new profile Using Outlook 3
G Can't create Folder Groups in Outlook 2013 Using Outlook 0
N Outlook rules don't create a copy for bcc'ed emails Using Outlook 3
F Delete/create/reset Exchange mailbox on Outlook.com Using Outlook.com accounts in Outlook 3
R Can not create folder to store specific emails in in Outlook for Mac Using Outlook 1
W Create Search Folder excluding Specific Email Addresses Using Outlook 5
A Outlook macro to create search folder with mail categories as criteria Outlook VBA and Custom Forms 3
K VBA BeforeItemMove event create rule to always move to its folder. Outlook VBA and Custom Forms 4
JackBlack What tools do you use to create the signature for email? Using Outlook 3
Rupert Dragwater How to create a new email with @outlook.com Using Outlook.com accounts in Outlook 32
F Should a new email account also create new contacts Using Outlook 2
D create an html table in outlook custom form 2010 using vba in MsAccess Outlook VBA and Custom Forms 7
R Outlook add-in to create new contact from an email. Using Outlook 0
Tanja Östrand Outlook 2016 - Create Macro button to add text in Subject Outlook VBA and Custom Forms 1
Q Script to create a pst file for Archiving Using Outlook 1
Jennifer Murphy Can I create a Rule with Or'd conditions? Using Outlook 1
D Outlook macros to create meeting on shared calendar Outlook VBA and Custom Forms 10
G How do I create a custom pick list in VB for an outlook automated email? Outlook VBA and Custom Forms 1

Similar threads

Back
Top