I am trying to open a Word doc, but neither the OpenInWord nor OpenInBrowser are working correctly. There are two issues: one is with read-only, the other has to do with SaveType:
Issue #1:
- I save the document using doc.Save(myDocName) [doc is an instantiation of Document]. That works.
- I added doc.Protect(ProtectionType.NoProtection) before doc.Save, since the docs were opening in Read-Only mode. That didn’t change anything; they still opened as Read-Only. I need to open them so they can be edited and saved.
Issue #2:
- If I try to open the doc for editing using: doc.Save(myDocName, SaveFormat.Doc, SaveType.OpenInWord, Response), I get square brackets appended to the file name, e.g. “lab_result_238239[1].doc”, which seems to be an IE issue (based on other forums and other threads in this forum), as it does not occur with Firefox. Unfortunately, IE is the company standard, so that’s what I’m stuck with. So the OpenInWord option is out.
- If I try to open the doc for editing using doc.Save(myDocName, SaveFormat.Doc, SaveType.OpenInBrowser, Response), the file name is now listed as “GetDoc.aspx” in the Word title bar (GetDoc.aspx is the .NET web form name), and when attempting to save, the doc name that displays is “GetDoc.doc”. In another thread (Why name the document when saving to browser), the response was that “the passed filename indeed seems to be ignored. That appears to be standard browser behavior and we have nothing to do with it.”
So, given that SaveType only has those two options and neither work, what am I supposed to do?
(I’m running XP, Word 2003, and IE7).
Thanks