HI,
I’ve got a specific document that throws an InvalidCastException when UpdatePageLayout is called after removing the normal styles. The .zip below is a distilled version of a larger service we have that combines files. We’re usually calling UpdatePageLayout after appending every document, but in this console app I’m only using one. A copy of the exception I see can be found in the Program.cs of the console app. It seems like a lot of it is obfuscated, so there’s not anything to get out of it.
I have seen this work fine with most other .docx documents we’ve tried, but can’t figure out why this one is having issues. The document(cover design 7.docx) is in the .zip.
Here’s a .zip containing a console app that reproduces the problem: https://drive.google.com/open?id=1X-IbDI15BnXfSmJJ9DA8iXQ24ZjX9R7z
Thank you for any help you can offer,
- Josh