Outlook: Macro to Change Case on Text Within Body of Message

explorer

New Member
Joined
Mar 22, 2012
Messages
11
I need help configuring a macro in Outlook, The Marco would begin each email reply with "Dear " and automatically insert the name appearing from within the body of the email which is located between the special characters / and =

The name currently resides in the body of the message and consists of all capital letters. I want the first letter of each word of the name to be capitalized and the remainder of the word to be in lower case. The name within the body of the email resides between the characters / and =

For example in the body it shows:

/ JOHN A DOE =

I want the email to start with:

Dear John A Doe,

Thank you in advance! I appreciate your help!
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Changing the case to make words begin with a capital letter can be done like this:

Code:
Sub Convert()
    Sheet1.Range("A1") = "ABCD EFGH IJKL MNOP"
    Sheet1.Range("A2") = StrConv(Sheet1.Range("A1"), vbProperCase)
End Sub
 
Upvote 0

Forum statistics

Threads
1,225,669
Messages
6,186,348
Members
453,350
Latest member
mjohnston819

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top