Beeto
New Member
- Outlook version
- Outlook 365 32 bit
- Email Account
- POP3
Hi all,
I have a problem with this code VBA. Works well when I send a message, replace the year. The problem is when I need to replay or forward a message, don´t replace and give me a Error 91. I would like this code for change the years old of company in my signature.
Thank for your help .
***************Code**************************
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim dataY As Date, year_X As Double
dataY = Date
year_X = Year(dataY) - 1973
Application.ActiveInspector.CurrentItem.HTMLBody = Replace(Application.ActiveInspector.CurrentItem.HTMLBody, "#year_old#", year_X)
End Sub
**********************************************
I have a problem with this code VBA. Works well when I send a message, replace the year. The problem is when I need to replay or forward a message, don´t replace and give me a Error 91. I would like this code for change the years old of company in my signature.
Thank for your help .
***************Code**************************
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim dataY As Date, year_X As Double
dataY = Date
year_X = Year(dataY) - 1973
Application.ActiveInspector.CurrentItem.HTMLBody = Replace(Application.ActiveInspector.CurrentItem.HTMLBody, "#year_old#", year_X)
End Sub
**********************************************