Expand|Select|Wrap|Line Numbers
- Word.Application oWord = null;
- Word.Document oDoc = null;
- object oMissing = System.Reflection.Missing.Value;
- object sFN = @"C:\Test\TestDoc.doc";
- try
- {
- // Is Word running?
- oWord = Marshal.GetActiveObject("Word.Application") as Word.Application;
- }
- catch (COMException ce)
- {
- if (ce.ErrorCode == unchecked((int)0x800401E3))
- // No, Word not in ROT, start a new instance
- oWord = new Word.Application();
- }
Expand|Select|Wrap|Line Numbers
- oDoc = oWord.Documents.Open(ref sFN,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,
- ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,
- ref oMissing,ref oMissing,ref oMissing,ref oMissing);
I have searched high and low and cannot find any reference to this behavior.
Anyone ever encountered this?
Thanks in advance...RK