Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9216545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:26:26+00:00 2026-06-18T02:26:26+00:00

We are trying to access the SaveFormat property of a Microsoft.Office.Interop.Word.Document instance (I guess

  • 0

We are trying to access the SaveFormat property of a Microsoft.Office.Interop.Word.Document instance (I guess it’s technically a DocumentClass instance since Document is an interface). Upon attempting to read SaveFormat, Word crashes rather ungracefully. Wrapping the access in a try..catch block is no good, either; control is getting passed to another assembly which decides to terminate the app rather than throwing the exception for me to re-catch.

This occurs whether I’m simply reading the property in code, like this:

WdSaveFormat saveFormat = this.document.SaveFormat; // document is a Microsoft.Office.Interop.Word.Document

Or when I access the property in a Watch using the debugger.

I suspect the document instance itself is fine; its other properties (e.g., Path) can be reflected on. Running a quickwatch on the document object yields legitimate-looking values rather than a bunch of red-flag-raising “could not evaluate”, “null”, etc. values. I can scroll down line-by-line in the Quickwatch window and once it gets to SaveFormat it blows up.

The crash occurs in Word 2007 as well as Word 2010.

I’ve tried both embedding the PIA types and not embedding them (“Embed Interop Types” flag in reference properties)

I’ve tried referencing the Word 2007 PIAs instead of the 2010 versions. Same behavior.

We’re targeting .NET 4.0 in our projects, but I’ve also tried targeting 3.5. No change.

Any ideas? About to defenestrate my comp 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:26:27+00:00Added an answer on June 18, 2026 at 2:26 am

    It turns out the document was a zero-byte file. Our bad, but it would have been nice had Word thrown a helpful exception (similar to what happens when you try accessing Application.ActiveDocument with no document open) rather than just blow up. Oh well, grand mystery solved. 🙂 Thanks 0xA3 for suggestion that maybe the document itself was the issue. Ever get on one track of thinking and forget to look at the obvious?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to access some custom data emitted into an SVG document by Visio
While trying to access the methodptr property of a delegate object, I am getting
Trying to access a property from the parent page on my user control. Here's
I'm trying to access a method in a class I made, but since it
Trying to access a Servlet from a button on HTML page //Html Page FORM
When trying to access the database, I am unable to access the column. I
Im trying to access the Magento customer session in another part of my website.
Im trying to access a Sql CE 2005 database on a windows mobile device
I am trying to access information on a website that uses frames. When I
I am trying to access all the data from database listOfFolder table folder and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.