Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-06-2021, 10:00 AM
Meditating Meditating is offline Custom Fields in Outlook Emails Windows 10 Custom Fields in Outlook Emails Office 2016
Novice
Custom Fields in Outlook Emails
 
Join Date: Jan 2021
Posts: 9
Meditating is on a distinguished road
Default Custom Fields in Outlook Emails

I am new to trying to modify the Office Suite but have some past experience in other products. If you can help me with a response, please keep it on a kindergarten level because that is where I am currently.



I would like to add a custom field (Case Code) to every Outlook email which identifies the case / project to which the email is connected. If I modify my emails to include and display this field:

1. Will an incoming email default to my customized design so that I can add the case code?

2. If I have completed this field in an outgoing email, will receipt of the reply email already contain the data in the field? (I assume it will).

3. It is my plan to use my email in conjunction with a companion dbase set up in Access. I know I can create a list of responses in an Access table which can be used to lookup a value in another Access table. Can that Access table be access by an Outlook email form? Example: An Access table includes two fields, the Case Code and the Case Reference. When clicking on the Case Code field in the Outlook email form, can it be linked to the Access table to choose from a list of valid case codes and then populate the field in my email?

Thanking you in advance, Rachael
Reply With Quote
  #2  
Old 07-06-2021, 09:33 PM
gmayor's Avatar
gmayor gmayor is offline Custom Fields in Outlook Emails Windows 10 Custom Fields in Outlook Emails Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

The short answer is 'no'.
You have no control over your clients' e-mail applications. You have no control over the incoming e-mail formats - with plain text having no compatibility with fields. If you add material to messages, you damage their evidential value in the event of a future legal action.
In theory you can add to an e-mail message, either incoming or outgoing using a macro (or in the case of incoming a script attached to a rule), but I would avoid fields. At its simplest it would be as follows, but you could replace the reference input box with a lookup to the Access table.
Open a new (or existing) message and run the Test macro.

Code:
Sub Test()
Dim olMsg As MailItem
On Error Resume Next
    Select Case Outlook.Application.ActiveWindow.Class
        Case olInspector
            Set olMsg = ActiveInspector.currentItem
        Case olExplorer
            Set olMsg = Application.ActiveExplorer.Selection.Item(1)
    End Select
    AddData olMsg
    Set olMsg = Nothing
End Sub

Sub AddData(olItem As MailItem)
'Graham Mayor - https://www.gmayor.com - Last updated - 07 Jul 2021
Dim olInsp As Outlook.Inspector
Dim wdDoc As Object
Dim oRng As Object
Dim sCase As String, sRef As String

    sCase = InputBox("Enter the case number")
    sRef = InputBox("Enter the reference number")

    With olItem
        .BodyFormat = olFormatHTML
        Set olInsp = .GetInspector
        Set wdDoc = olInsp.WordEditor
        Set oRng = wdDoc.Range
        oRng.collapse 1
        oRng.Text = "++++++++++++++++ Admin use only ++++++++++++++++++++" & vbCr & vbCr & _
                    "Case: " & sCase & vbCr & "Reference: " & sRef & vbCr & vbCr & _
                    "++++++++++++++++++++++++++++++++++++++++++++++++++" & vbCr & vbCr
        oRng.collapse 0
        oRng.Select
    End With
lbl_Exit:
    Set olInsp = Nothing
    Set wdDoc = Nothing
    Set oRng = Nothing
    Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Fields in Outlook Emails Custom fields formula fragono Project 2 03-02-2016 11:03 AM
Custom Fields in Outlook Emails Custom fields used in the Compare Function OTPM Project 3 03-02-2015 06:43 AM
Contact custom fields not showing Hmcrunchy Outlook 0 08-28-2013 03:54 AM
Custom Fields in Outlook Emails Tasks Import ( Custom fields) VidyaR Outlook 1 02-13-2013 07:01 AM
Stumped on Grouping with Custom Fields... ViperMan Project 1 06-22-2011 01:31 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:24 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft