Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-14-2023, 02:04 AM
TylerDurden TylerDurden is offline Help...Trying to use VBA in Outlook to add "to/from" recipient initials to subject Windows 10 Help...Trying to use VBA in Outlook to add "to/from" recipient initials to subject Office 2021
Novice
Help...Trying to use VBA in Outlook to add "to/from" recipient initials to subject
 
Join Date: Aug 2023
Posts: 1
TylerDurden is on a distinguished road
Default Help...Trying to use VBA in Outlook to add "to/from" recipient initials to subject

Hi all,

I currently have a script which on my selecting of mail items, adds the current date in YYYYMMDD format in addition to the existing subject line.

I'd now like to add the "to/from" recipient initials of the selected email in addition to what I have already scripted.

For example, I'd like to select an email(s), run vba and then have the email format change to "YYYYDDMM DH to BD existing subject line"

Current script is as follows:

Sub selectedMailItemsSubjectWithDate ()
Dim Mitem As MailItem
On Error GoTo ExitPos
For Each MItem in ActiveExplorer.Selection
MItem.Subject = Format (MItem.ReceivedTime,
"YYYYMMDD") & " " & MItem.Subject
MItem.Save
Next
ExitPos:
End Sub





Any help would be much appreciated!

T
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help...Trying to use VBA in Outlook to add "to/from" recipient initials to subject "Title" and "Subject" fields not possible to delete einers Word 3 10-15-2020 07:51 AM
How do I move a contact from "Recipient Cache" into Contacts? ship69 Outlook 2 01-09-2018 11:20 AM
How do I remove the "recipient cache", completely, forever? ship69 Outlook 0 09-09-2017 03:46 AM
Run *.bat once the outlook mail received with Subject line "welcome" on daily by user yogananda Outlook 0 03-04-2012 11:19 AM
"Send to" mail recipient forlino Mail Merge 0 03-17-2010 10:26 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:04 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