R
RogerM
I'm trying to run a sript that will execute when an email message arrives
that will replace ]] with %5D%5D. I've tried the code below, but keep keep
getting an error that a user-defined type isn't defined. Maybe the code
below isn't even close for what I'm trying to accomplish, I don't know.
Any assistance would be appreciated. ~ Roger
Sub FixHyperlink(MyMail As MailItem)
Dim strID As String
Dim objMail As Outlook.MailItem
Dim strText As Object
strID = MyMail.EntryID
Set objMail = Application.Session.GetItemFromID(strID)
strText = objMail.Body
With objMail.Body
strText = Replace(strText, "]]", "%5D%5D")
End With
objMail.Save
Set objMail = Nothing
End Sub
that will replace ]] with %5D%5D. I've tried the code below, but keep keep
getting an error that a user-defined type isn't defined. Maybe the code
below isn't even close for what I'm trying to accomplish, I don't know.
Any assistance would be appreciated. ~ Roger
Sub FixHyperlink(MyMail As MailItem)
Dim strID As String
Dim objMail As Outlook.MailItem
Dim strText As Object
strID = MyMail.EntryID
Set objMail = Application.Session.GetItemFromID(strID)
strText = objMail.Body
With objMail.Body
strText = Replace(strText, "]]", "%5D%5D")
End With
objMail.Save
Set objMail = Nothing
End Sub