Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-OfficeWord error - Exception calling "Load" with "3" argument(s): "This isn't implemented yet?" #9

Closed
v-bulynkin opened this issue Mar 5, 2023 · 7 comments

Comments

@v-bulynkin
Copy link

Hello! I'm trying to read a simple .docx file which has been created in Onlyoffice and getting the following error:

WARNING: Get-OfficeWord - File C:\temp\hamlet.docx couldn't be open.
Error: Exception calling "Load" with "3" argument(s): "This isn't implemented yet?"

Is it critical to have only MS Word-created source documents and what is the problem in this case when there's nothing special in the .docx file?

@PrzemyslawKlys
Copy link
Member

So this is related to me being "smart" and wanting to track what kind of functionality is not yet implemented. It's kind of useless because the word doc can be read and saved without having to know what it is.

This was fixed in:

But this library has not yet been updated to it. I need to sit down and resolve some conflicts and update library to new DLL which doesn't have this issue.

@PrzemyslawKlys
Copy link
Member

I've checked and it seems the Hamlet document implements FoonoteProperties/EndnoteProperties:

@v-bulynkin
Copy link
Author

OK, thanks! Maybe it would be useful to have a key like -SkipIncompatible to skip all not supported properties during reading or ignore those properties by default...

@PrzemyslawKlys
Copy link
Member

No, it doesn't even make sense. It's complaining about those 2 entries

image

The thing is - unless you want to "change them" with PSWriteOffice or OfficeIMO you can use both and never notice there is an issue.

The only time it matters if we add/move/change sections and initially it was a problem

image

But we changed it that simply if it's not one of those things we don't support we simply clone them on the move and that's it. so unless you are after setting those settings, you can just ignore. And if you are a Developer there's "Debug" option where you will see this error now/

@v-bulynkin
Copy link
Author

Could you really import this file?

PS C:\temp> $doc = Get-OfficeWord "C:\temp\hamlet.docx"
WARNING: Get-OfficeWord - File C:\temp\hamlet.docx couldn't be open. Error: Exception calling "Load" with "3" argument(s): "This isn't implemented yet?"

PS C:\temp> $doc.GetType()
You cannot call a method on a null-valued expression.
str:1 char:1
+ $doc.GetType()
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

@PrzemyslawKlys
Copy link
Member

Not in PSWriteOffice current version... it needs to be updated. Current PSWriteOffice is based on 0.4.0 of OfficeIMO. While OfficeIMO is on 0.4.8 version now, soon to be on 0.4.9 with more features: https://github.com/EvotecIT/OfficeIMO/releases

The exception was removed on 0.4.7 version

@v-bulynkin
Copy link
Author

Ah, now I see. Well, waiting for the next version and thanks for this great module!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants