If you can do what I describe in Clicking a Button in Another Application then that would be more reliable. If possible, you should get the control id of the text box and send a WM_SETTEXT message to fill in the filename then get the control id of the button to send a BN_CLICKED notification message. My sample code is for a C# Windows Forms application but I hope that is enough to get it working in VBA.
Here is a bit about BN_CLICKED. The documentation says:
The parent window of the button receives this notification code through the WM_COMMAND message.
So the message id in SendMesage is WM_COMMAND. The wParam is a combination of the button's control id and the notification code. Since the notification code is zero, for a BN_CLICKED you can omit it but you should make a comment in your code indicating something appropriate. The lParam is the window handle for the button. So in the following:
int wParam = (BN_CLICKED << 16) | (ButtonId & 0xffff);
I am shifting BN_CLICKED (which is actually zero) and oring that with the button id; The & 0xffff
just ensures that we use just 16 bits but that is likely not important. So it will likely work to just set wParam to the button's control id.
The advantage of BN_CLICKED is that it is just one message sent to the parent. It seems cleaner to me, at least.