Read text from docm file

I am trying to read from a word file of docm format. If I use the “WordDocument\Read Text” activity, I get an error saying “Sequence contains no elements”.

If I use the “Read Text File” activity, the results I get are unintelligeble.

If I use Word application scope along with “Read Text” activity, I am able to read, but I get some weird question marks as part of the result, which makes the text difficult to work with further. For instance, if I try to save it to a file then the file gets corrupted, etc. In any case the result is not the same as when I manually save the file as a docx file and use the “WordDocument\Read Text” activity…

What can I do to make this activity work?

Hello!

I have tested here and I was able to read the .docm file without problem.

Here’s how I did it:
image

About the questions mark, It might be some encoding problem. Try to convert to another encode and everything will work fine :slight_smile:

Hope it Helps!

Regards,

1 Like

Hi,

Thank you for your quick reply!

Do you mean to enter another encoding in the Read Text activity? What options do I have there?

Just realized that there is no encoding input property for the Read Text of the Word Application Scope (or for the word Application scope itself), only for the Read Text File activity?

How can I convert to another encode?

Tea

Can anyone from UiPath please help with how I can read from a docm file? (And get the same results as when the text is in docx.) I do not know how I can change the encoding for the only activity where I am able to read from the docm file, and the results look strange!