


I do not know if the ForeColor or BackColor represent the color that i need, I tried to choose different background colors and executed the above code and every time I got a different integer value like (10092543, 255 for red. Ref oTrue, ref oMissing, ref oMissing, ref oMissing) Ĭonsole.WriteLine(.RGB) Ĭonsole.WriteLine(.RGB) Ref oMissing, ref oMissing, ref oMissing, ref oMissing, Ref fileName, ref oMissing, ref oFalse, ref oMissing, ADDING A NEW DOCUMENT TO THE APPLICATION Word.Document oWordDoc = new Word.Document()

Word.Application oWord = new Word.Application() Go to : Format menu -> Background and choose color.Īnd here what I have in C#: Object oMissing =.Open MS Word 2003, and open a document.Note: I mean the background color applied by the following steps: I'm using C# office ( word) automation by Microsoft Office 12.0 Object Library.Īnd I opened a "1.doc" file and I need to check if this file has a background color or not.
