A
Alan Holbrook
[Outlook 2003]
I wrote a bit of VBA code to find a folder in my inbox, cycle through the email messages in that folder, and save the messages as text files to a directory on my hard drive. When I ran the code, I got the infamous "Someone is trying to access your deepest, darkest secrets..." box, which I expected and which is acceptable in this case because there are only a few email messages in the folder at any one time. But here's the strange part: if I just clicked 'OK' repeatedly as each message came up, the messages were saved correctly in the directory I specified. But if I clicked the check box that said "Allow access for" and let the program run on its own, the messages that were saved to hard disk were truncated. The header info (from, to, cc, subject, sent) were all there, but the body of the email with the text was gone.
I tried adding delay loops at strategic places in the code, thinking it was a timing issue, but that didn't change anything. I even popped a message box at each loop so that a very good bit of time would pass between files. Still didn't work.
Does anybody have any idea why the code works when I click for each individual message but doesn't when I let it run?
TIA...
I wrote a bit of VBA code to find a folder in my inbox, cycle through the email messages in that folder, and save the messages as text files to a directory on my hard drive. When I ran the code, I got the infamous "Someone is trying to access your deepest, darkest secrets..." box, which I expected and which is acceptable in this case because there are only a few email messages in the folder at any one time. But here's the strange part: if I just clicked 'OK' repeatedly as each message came up, the messages were saved correctly in the directory I specified. But if I clicked the check box that said "Allow access for" and let the program run on its own, the messages that were saved to hard disk were truncated. The header info (from, to, cc, subject, sent) were all there, but the body of the email with the text was gone.
I tried adding delay loops at strategic places in the code, thinking it was a timing issue, but that didn't change anything. I even popped a message box at each loop so that a very good bit of time would pass between files. Still didn't work.
Does anybody have any idea why the code works when I click for each individual message but doesn't when I let it run?
TIA...