Difference between Word and WordDocument activities

What’s the difference between App Integration > Word activities and System > WordDocument activities in version 1.3.4?

Getting different behaviour with the Read Text activities, when using a Word Application Scope and its respective Read Text activity the file can be read, but when using the other Read Text I get an exception:

System.NullReferenceException: Object reference not set to an instance of an object.
at Novacode.Container.GetListItemType(Paragraph p)
at Novacode.Container.get_Paragraphs()
at Novacode.DocX.get_Paragraphs()
at Novacode.DocX.PostLoad(Package& package)
at Novacode.DocX.Load(String filename)
at UiPath.Word.FileDocument…ctor(String documentPath, Boolean createNew)
at UiPath.Word.Activities.DocumentActivity.BeginExecute(AsyncCodeActivityContext context, AsyncCallback callback, Object state)
at System.Activities.AsyncCodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

_Sandbox.xaml (7.5 KB)

Hi

This package was especially made for reading and writing, and other manipulation for WORD DOCUMENTS

While this one is for .txt file

And when we are using WORD APPLICATION SCOPE and to read the word document we need to use READ TEXT from word package (when searched in Activity Panel)

Not the Read Text File activity which is for txt file

And the error looks like the activity with this error has a variable in it with null value
Kindly check the variable whether it is passed with value or not

Cheers @Spamish

The _Sandbox.xaml workflow has 4 activities that set the file name, and read the content twice
Workflow > Control > Assign
image
App Integration > Word > Word Application Scope
image
App Integration > Word > Read Text
image
System > File > WordDocument > Read Text
image

When running I get this exception

18.4.3+Branch.master.Sha.9888b477be8d3ec8a832306fc59c34ba6edad108
Source: Read Activity Text
Message: Object reference not set to an instance of an object.
Exception Type: System.NullReferenceException
An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.NullReferenceException: Object reference not set to an instance of an object.
at Novacode.Container.GetListItemType(Paragraph p)
at Novacode.Container.get_Paragraphs()
at Novacode.DocX.get_Paragraphs()
at Novacode.DocX.PostLoad(Package& package)
at Novacode.DocX.Load(String filename)
at UiPath.Word.FileDocument…ctor(String documentPath, Boolean createNew)
at UiPath.Word.Activities.DocumentActivity.BeginExecute(AsyncCodeActivityContext context, AsyncCallback callback, Object state)
at System.Activities.AsyncCodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

May I know what is the value of scopetext or activitytext variables passed as input file path to either of READ activity
As it didn’t have any value in it the activity throws error like object reference has no value in it
Kindly check that once
Cheers @Spamish

scopetext and activitytext are the output of the Read Text activities. I feed those into a Log Message activity

Remove this activity

We need only Read Text activity inside the Word application scope

Cheers @Spamish

I’m trying to find out why ‘System > File > WordDocument > Read Text’ is behaving differently to ‘App Integration > Word > Read Text’. Removing that activity doesn’t solve that.

I’ve found the couple of lines that appear to be causing the issue
Word Docs.zip (20.2 KB)

Looks like there’s problems handling bullet points and symbols that aren’t in the standard fonts.