question

30790985 avatar image
0 Votes"
30790985 asked 30790985 answered

Method Invocation Exception,Null Reference Exception displayed in powershell when uiautomation clicks the Microsoft Word File Tab.

Steps:
1.Open the microsoft word document [Office19_W_006_PCL6-E_A4LCp17EN.docx]
2.In Microsoft Word Document Window, Click File Tab.
Here, I used Microsoft Uiautomation API below
Step2.1. Click File Tab by Invoke() ->Exception Occured, Goto Step2.2
Step2.2. Click File Tab by Select() ->Exception Occured, Goto Step2.3
Step2.3. Click File Tab by Toggle() ->Exception Occured, Goto powershell Error
3.Powershell Error:
200467-image.png


Question:
Is there something wrong with the document I used?
or Is there something wrong with the Microsoft Uiautomation API I used?

When I used other .docx document to test, exception above does not occur.
When I delete some data like this, the powershell script will be run OK.
200448-image.png


Comments:
Microsoft Word document's File Tab UI infomation got by inspect.exe.
200486-image.png


windows-server-powershell
image.png (143.4 KiB)
image.png (204.6 KiB)
image.png (56.7 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

30790985 avatar image
0 Votes"
30790985 answered

Is there anyone can follow this question?
@tbgangav-MSFT

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.