Hi all, this is probably classed as more of a general Windows issue but I receive excellent help here and the program that runs it all is actually Excel so here goes..

I have a scheduled task which opens my spreadsheet. This spreadsheet has code that runs a microsoft query report, saves the output as a new xls to a different folder and the edits and initiates a separate .vbs file to send an email with this file(s) attached via Outlook. Works perfectly.

The problem I have always had is that if the computer is locked, the task won't start. I have variances of this spreadsheet that run at different times of night and day and so I have always had to have a computer that never goes to the lock screen. Due to company policy, this will soon no longer be an option. Ideally I would run this from a server (remote desktop) but the screen will lock after 5 mins. Would anyone have any pointers as to how get this scheduled task to run while computer is locked?

Thanks very much, John