M
Mr. B
I have run into the strangest thing that I have ever seen in over 15 years of
VBA programming in Access.
I am using Access 2007 and Outlook 2007.
I am having code from Access start and instance of Outlook for the purpose
of iterating through all emails in a specific folder and read a delimited
string from the email. Each of several fields of data is then extracted from
that delimited string.
Where the problem comes in is when the following code is executed to read
the content from the body of the email.
strContent = OlMail.Body
When the content is viewed from Outlook is looks like this:
charles|hall|80 N Church
Street||SomeTown|MS|39437|601-555-5555||[email protected]|||Other|friend|
N|N
However, when I check the content of my "strContent" variable, which is
defined as a string variable, the content of the variable is:
charles|hall|80 N Church
Street||SomeTown|MS|39437|601-555-5555||[email protected]|||Other|fri
Street||SomeTown|MS|39437|601-555-5555||end|
N|N
Some of the data and the "|" delimiters have been repeated.
Does anyone have any idea why the value shown in the email body and the
value stored in the "strContent" variable as populated from the OlMail.Body
would be different?
If I forward the email from the Outlook 2007 computer to my personal email
that is using Outlook 2002, then the reverse happens. When the email arrives
I see the content as I described it when stored in the variable.
If I open the email with the bad data string and go to View/Encoding and
select a different encoding option, the data string is immediately change
from the bad string to the correct string, delimited as it should be
I know this sounds impossible but I swear this is exactly what has happened
in several cases. To make matters worse, sometimes the two values are the
same.
And, no, I have not been drinking. I can actully reproduce these occurances
and I would be happy to do a "gotomeeting" session with anyone who can help
me figure out what is going on.
Thanks for reading this very long explanation. Any help is appreciated.
Mr. B
VBA programming in Access.
I am using Access 2007 and Outlook 2007.
I am having code from Access start and instance of Outlook for the purpose
of iterating through all emails in a specific folder and read a delimited
string from the email. Each of several fields of data is then extracted from
that delimited string.
Where the problem comes in is when the following code is executed to read
the content from the body of the email.
strContent = OlMail.Body
When the content is viewed from Outlook is looks like this:
charles|hall|80 N Church
Street||SomeTown|MS|39437|601-555-5555||[email protected]|||Other|friend|
N|N
However, when I check the content of my "strContent" variable, which is
defined as a string variable, the content of the variable is:
charles|hall|80 N Church
Street||SomeTown|MS|39437|601-555-5555||[email protected]|||Other|fri
Street||SomeTown|MS|39437|601-555-5555||end|
N|N
Some of the data and the "|" delimiters have been repeated.
Does anyone have any idea why the value shown in the email body and the
value stored in the "strContent" variable as populated from the OlMail.Body
would be different?
If I forward the email from the Outlook 2007 computer to my personal email
that is using Outlook 2002, then the reverse happens. When the email arrives
I see the content as I described it when stored in the variable.
If I open the email with the bad data string and go to View/Encoding and
select a different encoding option, the data string is immediately change
from the bad string to the correct string, delimited as it should be
I know this sounds impossible but I swear this is exactly what has happened
in several cases. To make matters worse, sometimes the two values are the
same.
And, no, I have not been drinking. I can actully reproduce these occurances
and I would be happy to do a "gotomeeting" session with anyone who can help
me figure out what is going on.
Thanks for reading this very long explanation. Any help is appreciated.
Mr. B