So I just started being able to use Citrix Receiver which I think connects to a virtual desktop where Microsoft office 2016 is a desktop application. This virtual desktop I believe is always running. I have some excel macros that I would like to trigger from windows task scheduler on the virtual desktop.
I have created macros that do not use sendkeys that I have tested and work successfully on the virtual desktop whether I'm actively connected to it or if I'm not connected at all to the virtual desktop.
I have also created some macros that use sendkeys in the virtual desktop. When I am actively connected to the Citrix receiver virtual desktop, then my macros with sendkeys work perfectly fine. It is only when I use task scheduler to trigger the macro with sendkeys to run at a time when I am not actively connected to the virtual desktop that the sendkeys do not seem to work.
I do not really understand why this happens? From doing some web searching, it seems that people often run into issues using sendkeys with Citrix receiver. However, I have no problem using sendkeys when I'm actively connected. It's only an issue with sendkeys when I'm not actively connected. Does sendkeys somehow interact and use the active machine that I'm on or something in order to register the sendkeys on the virtual desktop?
Thanks for the help and let me know if what I explained does not make sense.