Workflows within Application Scope

I’m creating some workflows within a Word Application Scope and am having issues with passing in the file pointer as an argument.

I created a very simple application to demonstrate what I’m trying to accomplish. I create a simple flow opening a word document. I then placed a Read Text within the application scope and converted it to a workflow.

When running this I get an error “Delegate to an instance method cannot have null ‘this’.”

So the questions are, how do I pass in the this pointer to a workflow, and two when I get it passed in how can I use it for methods like Read Text.

I know I could just do this outside of the workflow and then pass in the strings created, but I’m hoping to create a library of more turn key solutions for my end users.

If you can use a scope variable in the Output parameter of your scope, then you can pass that as an IN argument in your workflows, then in the workflows use that variable in the parameters of the scope activity.

However, if you are just manipulating the text and want to use Read Text, then you can pass the filename as a string as an IN argument. You can also use the text you store from the Read Text as an IN/OUT argument so you can pass it between other workflows.

Those are my 2 cents.


Those are actually the limitations I was trying to work around. The Word application doesn’t have an output parameter only the excel app has that.

I’m hoping to process the word file as I go and not have one big dump at the end. Also going in and out of the word scope slows the bot down extremely since it keeps having to close and open word.

So that’s the conundrum, I want to use the word application scope, workflows, save as I go, and not having to open and close the application scope.

You could try using Start Process or Open Application. You can use the filename in as Arguments to open the file.

Then using Attach Window, you can send the window variable to the workflows, or just use the selector again.