I am looking for a way to click on a button 'open file'.
I wrote an Excel VBA macro that connects with SAP module. What it should do is to add a file as an attachment in SAP. As a result I get pop-up window, just a standard Windows "open file" window to get the "file name" field and "open file" button.
My question is how to automatically insert a file name (always known) and click on that "open file" button?
I tried sendkeys
from within Excel VBA, but it turns out that once the "open file" window pops up the whole Sub routine stops.
I know I need Winapi to do this.