Click here to Skip to main content
15,890,123 members
Home / Discussions / C#
   

C#

 
AnswerRe: GhostScript Pin
Keith Barrow21-Nov-10 1:06
professionalKeith Barrow21-Nov-10 1:06 
QuestionGetting an Exception : (HRESULT: 0x800A140C ) while trying to close Word 2k10 Document Pin
Kushagra Tiwari19-Nov-10 3:13
Kushagra Tiwari19-Nov-10 3:13 
AnswerRe: Getting an Exception : (HRESULT: 0x800A140C ) while trying to close Word 2k10 Document Pin
Luc Pattyn19-Nov-10 3:41
sitebuilderLuc Pattyn19-Nov-10 3:41 
AnswerRe: Getting an Exception : (HRESULT: 0x800A140C ) while trying to close Word 2k10 Document Pin
Manfred Rudolf Bihy19-Nov-10 3:42
professionalManfred Rudolf Bihy19-Nov-10 3:42 
GeneralRe: Getting an Exception : (HRESULT: 0x800A140C ) while trying to close Word 2k10 Document Pin
Kushagra Tiwari19-Nov-10 9:47
Kushagra Tiwari19-Nov-10 9:47 
AnswerRe: Getting an Exception : (HRESULT: 0x800A140C ) while trying to close Word 2k10 Document Pin
Ian Shlasko19-Nov-10 10:03
Ian Shlasko19-Nov-10 10:03 
AnswerRe: Getting an Exception : (HRESULT: 0x800A140C ) while trying to close Word 2k10 Document Pin
Kushagra Tiwari22-Nov-10 0:17
Kushagra Tiwari22-Nov-10 0:17 
GeneralRe: Getting an Exception : (HRESULT: 0x800A140C ) while trying to close Word 2k10 Document Pin
GuzmanJ2-Mar-11 10:37
GuzmanJ2-Mar-11 10:37 
Apparently this issue occurs because the Compatibility Mode feature in Office 2010 (Word, Excel, etc.) has been turned off. I guess there are two ways you can fix this. Turn the Compatibility Mode feature back on or like the previous post mentions use the SaveAs() method instead. Using the SaveAs() method fixed the issue for me:

Microsoft.Office.Interop.Word._Document msWord = new Document();
object filename = "C:\\SomeWordFile.doc";

// Open the document. Perform operations on the msWord object.
// ...
// ...

// When it comes to close the document do something like this:

object fileFormat = Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatDocument;
object missing = System.Reflection.Missing.Value;
object notTrue = false;

msWord.SaveAs(ref filename,
ref fileFormat,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing);
msWord.Close(ref notTrue, ref missing, ref missing);

Hope this helps.
AnswerRe: Getting an Exception : (HRESULT: 0x800A140C ) while trying to close Word 2k10 Document Pin
gmr_evgen15-Aug-11 14:08
gmr_evgen15-Aug-11 14:08 
QuestionMoved from Q/A (originally posted by dmpinusa): Centralizing Exception Handling Code Pin
#realJSOP19-Nov-10 1:40
mve#realJSOP19-Nov-10 1:40 
AnswerRe: Moved from Q/A (originally posted by dmpinusa): Centralizing Exception Handling Code Pin
Luc Pattyn19-Nov-10 1:50
sitebuilderLuc Pattyn19-Nov-10 1:50 
GeneralRe: Moved from Q/A (originally posted by dmpinusa): Centralizing Exception Handling Code Pin
dpminusa20-Nov-10 13:51
dpminusa20-Nov-10 13:51 
GeneralRe: Moved from Q/A (originally posted by dmpinusa): Centralizing Exception Handling Code Pin
dpminusa20-Nov-10 14:54
dpminusa20-Nov-10 14:54 
GeneralRe: Moved from Q/A (originally posted by dmpinusa): Centralizing Exception Handling Code Pin
Luc Pattyn20-Nov-10 16:02
sitebuilderLuc Pattyn20-Nov-10 16:02 
GeneralRe: Moved from Q/A (originally posted by dmpinusa): Centralizing Exception Handling Code Pin
dpminusa20-Nov-10 20:06
dpminusa20-Nov-10 20:06 
AnswerRe: Moved from Q/A (originally posted by dmpinusa): Centralizing Exception Handling Code Pin
Pete O'Hanlon19-Nov-10 2:34
mvePete O'Hanlon19-Nov-10 2:34 
GeneralRe: Moved from Q/A (originally posted by dmpinusa): Centralizing Exception Handling Code Pin
dpminusa20-Nov-10 14:14
dpminusa20-Nov-10 14:14 
AnswerRe: Moved from Q/A (originally posted by dmpinusa): Centralizing Exception Handling Code Pin
_Erik_19-Nov-10 3:46
_Erik_19-Nov-10 3:46 
GeneralRe: Moved from Q/A (originally posted by dmpinusa): Centralizing Exception Handling Code Pin
dpminusa20-Nov-10 14:18
dpminusa20-Nov-10 14:18 
GeneralRe: Moved from Q/A (originally posted by dmpinusa): Centralizing Exception Handling Code Pin
_Erik_20-Nov-10 16:01
_Erik_20-Nov-10 16:01 
GeneralRe: Moved from Q/A (originally posted by dmpinusa): Centralizing Exception Handling Code Pin
dpminusa20-Nov-10 20:01
dpminusa20-Nov-10 20:01 
GeneralRe: Moved from Q/A (originally posted by dmpinusa): Centralizing Exception Handling Code Pin
_Erik_20-Nov-10 23:21
_Erik_20-Nov-10 23:21 
GeneralRe: Moved from Q/A (originally posted by dmpinusa): Centralizing Exception Handling Code Pin
dpminusa21-Nov-10 4:46
dpminusa21-Nov-10 4:46 
AnswerRe: Moved from Q/A (originally posted by dmpinusa): Centralizing Exception Handling Code Pin
Rhys Gravell21-Nov-10 23:57
professionalRhys Gravell21-Nov-10 23:57 
Questiondatetimepicker with multiple selected dates Pin
ajithnamboodiri18-Nov-10 19:58
ajithnamboodiri18-Nov-10 19:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.