logandiana
Board Regular
- Joined
- Feb 21, 2017
- Messages
- 107
I created a macro in outlook vba. All it does is take drafts that are in a shared email box and sends them. Since there are a lot of emails usually, instead of trying to have the macro send the emails to the outbox, while the outbox is trying to send. What I do is put myself in the 'work offline' mode. Then I run the macro and it sends all the emails from the shared drafts folder, or rather, it moves them to the outbox. Whenever its done, I put myself back online and the emails leave the outbox as needed.
Everything works fine with the macro on my end, but my coworker has the same macro in outlook, and the same access to the same shared folder.
They can run the macro just fine and it does what it's supposed to do.
BUT if they put their selves in 'work offline' mode and then run the macro. They get a Run-time error '-2147221210 (80040126)' The operation cannot be performed because the connection to the server is offline.
The line the error is on is.
Not sure why it works fine on mine whether online or offline, but only on theirs online.
Everything works fine with the macro on my end, but my coworker has the same macro in outlook, and the same access to the same shared folder.
They can run the macro just fine and it does what it's supposed to do.
BUT if they put their selves in 'work offline' mode and then run the macro. They get a Run-time error '-2147221210 (80040126)' The operation cannot be performed because the connection to the server is offline.
The line the error is on is.
VBA Code:
Set objDrafts = Session.Folders("email.email@domain.com").Folders("Drafts").Items
Not sure why it works fine on mine whether online or offline, but only on theirs online.