Dear Diane,
I’m writing to you because sometimes it seems as if you’re the only person who understands Microsoft Exchange and wants to help.
We have a resource calendar on MS Exchange 2010 we use to record employees’ offsite time. (That way managers and co-workers can see at a glance who’s in the office, who’s working from home, etc.) The only problem is Exchange resource calendars aren’t visible from mobile phones – only personal calendars are – and our security policies don’t allow publishing the calendar, so we wrote a VBA application (Outlook 2010) that copies a filtered version of the calendar to a secondary calendar folder in subscribers’ personal calendar folders. (As part of the subscription process, the person running the application had to be granted Owner permission on the subfolder – me, primarily, although other people act as backups.) The application was designed to run in cached mode, so that it wouldn’t require manual intervention if the Exchange servers were busy. Since we couldn’t run VBA as a server-side process, it ran on my personal instance of Outlook.
That worked fine from May, when the program was written, until a couple of months ago, when I had to forcibly shut down Outlook because it was hung, for some reason, and I wasn’t able to restart it. Tech support removed all my local files in the directory that contained the OST file, and we rebuilt the OST file a few times, but ever since that day, I’ve been unable to run the VBA app successfully in cached mode. The program always breaks immediately after the calendar is copied to a calendar folder in a shared account (shared by me and my backups). (Whenever the calendar is updated, it is copied to this temporary holding area because the program changes some settings and filters out items that don’t overlap with the 30-day window the users want to see, before it copies it to the subscribers’ folders.) The copied calendar is visible in Outlook, but for some reason VBA doesn't see it in cached mode anymore. The program breaks with a Runtime Error 91: "Object variable or With block variable not set" because the folder object variable that is supposed to be set when the calendar is copied, doesn’t get set, so nothing can be done with it. If the program is run in online mode, however, VBA has no problem recognizing the calendar – the object variable is set when the calendar is copied and the rest of the processes can be run on it.
I’ve been running the application in online mode as best I could ever since, but it’s not practical to do that in the long term, because we have users in India, and it means someone has to be watching the program 24/7 to respond to the prompts when the server is not available and to restart Outlook when we are disconnected from the server (which happens quite often).
Our Exchange support staff are baffled by the problem and they get no help from Microsoft, which says they won't support a custom program. But it's not the VBA program that needs troubleshooting. The copy function just doesn't set the variable in cached mode, even though the file has obviously been copied into the folder.
Have you any idea why this is happening?
Thanks,
Gabrielle
I’m writing to you because sometimes it seems as if you’re the only person who understands Microsoft Exchange and wants to help.
We have a resource calendar on MS Exchange 2010 we use to record employees’ offsite time. (That way managers and co-workers can see at a glance who’s in the office, who’s working from home, etc.) The only problem is Exchange resource calendars aren’t visible from mobile phones – only personal calendars are – and our security policies don’t allow publishing the calendar, so we wrote a VBA application (Outlook 2010) that copies a filtered version of the calendar to a secondary calendar folder in subscribers’ personal calendar folders. (As part of the subscription process, the person running the application had to be granted Owner permission on the subfolder – me, primarily, although other people act as backups.) The application was designed to run in cached mode, so that it wouldn’t require manual intervention if the Exchange servers were busy. Since we couldn’t run VBA as a server-side process, it ran on my personal instance of Outlook.
That worked fine from May, when the program was written, until a couple of months ago, when I had to forcibly shut down Outlook because it was hung, for some reason, and I wasn’t able to restart it. Tech support removed all my local files in the directory that contained the OST file, and we rebuilt the OST file a few times, but ever since that day, I’ve been unable to run the VBA app successfully in cached mode. The program always breaks immediately after the calendar is copied to a calendar folder in a shared account (shared by me and my backups). (Whenever the calendar is updated, it is copied to this temporary holding area because the program changes some settings and filters out items that don’t overlap with the 30-day window the users want to see, before it copies it to the subscribers’ folders.) The copied calendar is visible in Outlook, but for some reason VBA doesn't see it in cached mode anymore. The program breaks with a Runtime Error 91: "Object variable or With block variable not set" because the folder object variable that is supposed to be set when the calendar is copied, doesn’t get set, so nothing can be done with it. If the program is run in online mode, however, VBA has no problem recognizing the calendar – the object variable is set when the calendar is copied and the rest of the processes can be run on it.
I’ve been running the application in online mode as best I could ever since, but it’s not practical to do that in the long term, because we have users in India, and it means someone has to be watching the program 24/7 to respond to the prompts when the server is not available and to restart Outlook when we are disconnected from the server (which happens quite often).
Our Exchange support staff are baffled by the problem and they get no help from Microsoft, which says they won't support a custom program. But it's not the VBA program that needs troubleshooting. The copy function just doesn't set the variable in cached mode, even though the file has obviously been copied into the folder.
Have you any idea why this is happening?
Thanks,
Gabrielle