zunebuggy
05-22-2023, 10:10 AM
I have an Excel sheet open with a macro, another application and notepad.
I used to be able to copy from the one app (SendKeys "^C") and then switch focus to Notepad and then Paste (SendKeys "^V") the text and switch back to the application, repeat, etc. I think I used to do this with AppActivate but this seems to open a new instance of Notepad each time and also open a new instance of the application. I used to use this method and automate a time consuming task I only do once a year. I found examples online but they all open new instances on every copy/paste. I just need to switch between the two already open apps. Did Microsoft change things or am I forgetting how to do this?
I know SendKeys is not the best way to do this, but it is an older in-house application and screen grab is the best way for this copy/paste task.
Thank you.
I used to be able to copy from the one app (SendKeys "^C") and then switch focus to Notepad and then Paste (SendKeys "^V") the text and switch back to the application, repeat, etc. I think I used to do this with AppActivate but this seems to open a new instance of Notepad each time and also open a new instance of the application. I used to use this method and automate a time consuming task I only do once a year. I found examples online but they all open new instances on every copy/paste. I just need to switch between the two already open apps. Did Microsoft change things or am I forgetting how to do this?
I know SendKeys is not the best way to do this, but it is an older in-house application and screen grab is the best way for this copy/paste task.
Thank you.