Hello,
You would need to use Invoke Code activity rather than Invoke method.
Using is probably possible but would be quite tedious.
Invoke Code activity is available with the last version of the Community version for the time being.
It looks like this.
Once you have it you can copy/paste the VB.Net code from my previous code and it should work.
Cheers.