Access VBA code written and tested on one machine (run and formatted for Office 2003 reads and processes emails unattended from Outlook 2016) ... when this access application is transferred to another machine, using the same Library References, there are 2 issues stopping the process
1) OUTLOOK 2003 states: "A program is trying to access e-mail addresses you have stored in Outlook. Do you want to allow this?" This question requires a HUMAN response to DENY or ALLOW access for a max 10 minutes (this absolutely won't work for an unattended application) ... Outlook 2016 on the working machine doesn't complain ... Outlook 2003 (on the machine expected to run this application), is requesting a human response
Code:
oEmail.SenderEmailAddress ' From: address isn't necessarily in the Outlook Address Book
2) in debug mode on the machine having issues
a) Expanding the oEmail object shows <No Variables> ... the working machine shows all of the oEmail Values
b) the following variables were manually printed with the following results
Code:
- ? oEmail.Class -> 43 ' 43 is the expected object class, all other classes are filtered out
- ? oEmail.Subject -> returns the expected subject
- ? oEmail.body -> run-time error 287 application-defined or object-defined error (this works on the development machine
- ? oEmail.recipients.count -> returns the expected value
- ? oEmail.importance -> returns the expected value
The expectation was that on both machines, the ACCESS VBA code, references the SAME libraries ... so very confused by this failure ... both machines have the same test emails ... I looked through the security settings for Outlook 2003 and believe all the full stop or pause for response type settings have been turned off
I suspect issue 2 may also be related to Outlook wanting a human response to its security question
I realize this question is related to an old version but was hoping someone might recall this as an issue and know how it can be resolved.
Thanks in advance for any insight you can offer