Message Field
Haha, good point. I should have done so before.
Basically I have a web apps that tracks software issues on a project I
work on. It sends out e-mails whenever an issue is opened, updated,
closed, etc. But the from, to, addresses, etc. in the e-mail headers are
not informative and neither are the subjects of the e-mails. I am trying
to create a calculated field that does some string parsing to pull the
e-mail address out of the message body.
Not all e-mails are in the same format, but there is usually a text
string "Additional Comments From:" prefixing the actual e-mail address
somewhere in the body.
So the function below tries to find the location of the "Additional
Comments From" text string in the body of the message, then use that as
the starting point for grabbing the text after it (which should be the
e-mail address.) It chops off all text after the e-mail address and
before. And it works OK when the e-mail address and the "Additional
Comments From" string are in the first 255 chars of the message, but no
go afterwards. So I am wondering if there is another field I can use
that will give me the full message body.
Left(Right([Message],((Len([Message])-InStr(1,[Message],"Additional
Comments From",1)-Len("Additional Comments
From")))),InStr(Right([Message],((Len([Message])-InStr(1,[Message],"Additional
Comments From",1)-Len("Additional Comments From"))))," "))
Josh
Michael Bauer [MVP - Outlook] wrote:
It's hard to tell what that monster is expected to do. Could you explain in
plain text?
-- Best regards Michael Bauer - MVP Outlook Synchronize Outlook
Categories:
http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6
Am Fri, 21 Dec 2007 22:07:54 -0800 schrieb Josh Andrews:
I am trying to create a custom field in a view. I want to use the
InStr
function to scan the text of the message and find some particular
content. I've been using functions like the following:
Left(Right([Message],((Len([Message])-InStr(1,[Message],"Additional
Comments From",1)-Len("Additional Comments
From")))),InStr(Right([Message],((Len([Message])-InStr(1,[Message],"Additional
Comments From",1)-Len("Additional Comments From"))))," "))
The only problem is that the function doesn't always work like I think
it will, and a little bit of troubleshooting reveals that Outlook only
seems to look at the first 255 chars of the [message] field. The Len()
function always returns a maximum of "255" even if there is more to
the
text of the message.
Is there any way to access the full text of the message in a
calculated
field or am I just stuck? Or do I need to start writing forms or
full-blown plugins?
Josh
|