By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,922 Members | 1,944 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,922 IT Pros & Developers. It's quick & easy.

create word doc in C#

P: 4
SALAM = Hello

I want to create a word document in my C# application.
I get some help and example from web and msdn....
the problem is there is this sentence in sample code:

object oMissing = System.Reflection.Missing.Value;
object oEndOfDoc = "\\endofdoc"; /* \endofdoc is a predefined bookmark */

//Start Word and create a new document.
Word._Application oWord;
Word._Document oDoc;
oWord = new Word.Application();
oWord.Visible = true;
oDoc = oWord.Documents.Add(ref oMissing, ref oMissing,
ref oMissing, ref oMissing);

Word is not defined in namespace and i get compile error.
what is the missing using directive?
(I have added refernce via COM tab ,.....) and I added using Microsoft.Office.Core but still have problem.

Sep 11 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.