Hi.
Looked through the forum and couldn't find a response to this particular error.
I have an excel file which loops through emails in a particular folder in Outlook to extract details of the emails.
There are three main properties it's supposed to extract from Outlook: received time, subject and sender name. The VBA works fine for the first two (I.e. received time and subject), but for some reason when it gets to sender name it gives an error for some users (regardless of whether run from a button or by stepping through with F8). The error is "Run-time error '287: Application-defined or object-defined error"
The DIM I am using is:
Dim msg As outlook.MailItem
And the lines which work from the code are:
msg.ReceivedTime
msg.Subject
But the following one causes the above run time error. I have tried using .Sender and .SentOnBehalfOfName but still get the same.
msg.SenderEmailAddress
What are the most likely causes of the error that I could look into ? I'm hoping there's something really simple I can do to resolve
Thanks
Dave
Looked through the forum and couldn't find a response to this particular error.
I have an excel file which loops through emails in a particular folder in Outlook to extract details of the emails.
There are three main properties it's supposed to extract from Outlook: received time, subject and sender name. The VBA works fine for the first two (I.e. received time and subject), but for some reason when it gets to sender name it gives an error for some users (regardless of whether run from a button or by stepping through with F8). The error is "Run-time error '287: Application-defined or object-defined error"
The DIM I am using is:
Dim msg As outlook.MailItem
And the lines which work from the code are:
msg.ReceivedTime
msg.Subject
But the following one causes the above run time error. I have tried using .Sender and .SentOnBehalfOfName but still get the same.
msg.SenderEmailAddress
What are the most likely causes of the error that I could look into ? I'm hoping there's something really simple I can do to resolve
Thanks
Dave