Hi,
I'm trying to create a template so that I can have VBA prompt me to change items in the subject. I've got a template email with the subject line that should be Project / GC/Client, and in the template I've written that as #0# / #1 #. So far, I'm at the below, but it's erroring. Anyone have any ideas on how to correct?
Thanks!
I'm trying to create a template so that I can have VBA prompt me to change items in the subject. I've got a template email with the subject line that should be Project / GC/Client, and in the template I've written that as #0# / #1 #. So far, I'm at the below, but it's erroring. Anyone have any ideas on how to correct?
Thanks!
Code:
Private Sub m_Inspector_Activate()
dim Item as MailItem
dim Value as string
if typeof m_Inspector.currentitem is mailitem then
set mail=m_Inspector.currentitem
if mail.subject="subject" then
value=inputbox("Project")
mail.subject=replace(mail.subject,"#0#",value)
value=inputbox("GC/Client")
mail.subject=replace(mail.subject,"#1#",value)
endif
endif
end sub
Last edited by a moderator: