OilEconomist
Active Member
- Joined
- Dec 26, 2016
- Messages
- 441
- Office Version
- 2019
- Platform
- Windows
Thanks in advance for any help given!
What is the VBA Code to take an existing string and modify the last word. I would like to change e-mails to attachments.
For example, I have the directory stored:
C:\Files\Section A\e-mails\
and I would like to modify it to:
C:\Files\Section A\Attachments\
What is the VBA Code to take an existing string and modify the last word. I would like to change e-mails to attachments.
For example, I have the directory stored:
C:\Files\Section A\e-mails\
and I would like to modify it to:
C:\Files\Section A\Attachments\
VBA Code:
Option Explicit
Sub Modify_String()
Dim String_Org As String, String_New As String
String_Org = "C:\Files\Section A\e-mails\"
'Code to change String_Org to "C:\Files\Section A\Attachments\" and store it as String_Mod
'String_Mod = ?
End Sub