When I run the code , the first line below fails to run: Dim MyApp As New Microsoft.Office.Interop.Word.Application
and I get the following error: Invoke code: Exception has been thrown by the target of an invocation.
To start with please run the bot in debug mode…then you can open the locals pane and check the inner exception detils which will contain more and exact information if what failed inside the invoke code
“without Word Application Scope” isn’t the same as “without Word installed.” It just means they didn’t want to have to use the Word Application Scope activity to open each Word file. The code still requires Word to be installed, so the methods are available.
How come?
If word is not installed by opening document we cannot save the file as pdf
If we want to save pdf then we have to use word application scope to use word application scope Microsoft Office needs to install