Click here to Skip to main content
15,898,987 members
Home / Discussions / C#
   

C#

 
GeneralRe: version control software Pin
Khan Olid Mannan28-Feb-10 0:45
Khan Olid Mannan28-Feb-10 0:45 
GeneralRe: version control software Pin
Som Shekhar28-Feb-10 0:50
Som Shekhar28-Feb-10 0:50 
AnswerRe: version control software Pin
Wes Aday27-Feb-10 16:04
professionalWes Aday27-Feb-10 16:04 
GeneralRe: version control software Pin
Khan Olid Mannan28-Feb-10 0:53
Khan Olid Mannan28-Feb-10 0:53 
GeneralRe: version control software Pin
Wes Aday28-Feb-10 5:15
professionalWes Aday28-Feb-10 5:15 
AnswerRe: version control software Pin
Scott Serl27-Feb-10 16:25
Scott Serl27-Feb-10 16:25 
AnswerRe: version control software Pin
David Skelly28-Feb-10 22:40
David Skelly28-Feb-10 22:40 
QuestionOpening a Doc file Pin
gouthami chintala27-Feb-10 3:58
gouthami chintala27-Feb-10 3:58 
application Getting Crashed if i run the below code....

class Program
{
static void Main(string[] args)
{
try
{
Microsoft.Office.Interop.Word.ApplicationClass wordApp = new Microsoft.Office.Interop.Word.ApplicationClass();
object file = "D\\two.doc";
object readOnly = false;
object isVisible = true;
object o_null = System.Reflection.Missing.Value;


Microsoft.Office.Interop.Word.Document doc = wordApp.Documents.Open(ref file,
ref o_null, ref o_null, ref o_null, ref o_null, ref o_null,
ref o_null, ref o_null, ref o_null, ref o_null, ref o_null,
ref o_null, ref o_null, ref o_null, ref o_null, ref o_null);

doc.ActiveWindow.Selection.WholeStory();
doc.ActiveWindow.Selection.Copy();
IDataObject data = Clipboard.GetDataObject();
string allText = data.GetData(DataFormats.Text).ToString();
//doc.Close(ref missing, ref missing, ref missing);
//wordApp.Quit(ref missing, ref missing, ref missing);
Console.WriteLine(allText);
}
catch(Exception e)
{
Console.Write(e);
}

}
}

can some body help me out and suggest me the actual problem or else correct it.



Thanks in advance....
AnswerRe: Opening a Doc file Pin
Kristian Sixhøj27-Feb-10 4:04
Kristian Sixhøj27-Feb-10 4:04 
QuestionHow to clear a text file from my code? Pin
arsendem27-Feb-10 2:34
arsendem27-Feb-10 2:34 
AnswerRe: How to clear a text file from my code? Pin
Luc Pattyn27-Feb-10 2:43
sitebuilderLuc Pattyn27-Feb-10 2:43 
AnswerRe: How to clear a text file from my code? PinPopular
AspDotNetDev27-Feb-10 2:43
protectorAspDotNetDev27-Feb-10 2:43 
AnswerRe: How to clear a text file from my code? Pin
Abhinav S27-Feb-10 5:34
Abhinav S27-Feb-10 5:34 
QuestionHow to convers list<> type Pin
treuveni27-Feb-10 0:33
treuveni27-Feb-10 0:33 
AnswerRe: How to convers list type Pin
AspDotNetDev27-Feb-10 0:39
protectorAspDotNetDev27-Feb-10 0:39 
AnswerRe: How to convers list type Pin
Luc Pattyn27-Feb-10 0:44
sitebuilderLuc Pattyn27-Feb-10 0:44 
GeneralRe: How to convers list type Pin
treuveni27-Feb-10 0:54
treuveni27-Feb-10 0:54 
AnswerRe: How to convers list type Pin
Luc Pattyn27-Feb-10 1:04
sitebuilderLuc Pattyn27-Feb-10 1:04 
GeneralRe: How to convers list type Pin
#realJSOP27-Feb-10 2:21
professional#realJSOP27-Feb-10 2:21 
GeneralRe: How to convers list type Pin
AspDotNetDev27-Feb-10 1:04
protectorAspDotNetDev27-Feb-10 1:04 
AnswerMessage Closed Pin
27-Feb-10 1:33
stancrm27-Feb-10 1:33 
GeneralRe: How to convers list type Pin
AspDotNetDev27-Feb-10 2:01
protectorAspDotNetDev27-Feb-10 2:01 
AnswerRe: How to convers list type [modified] Pin
#realJSOP27-Feb-10 8:06
professional#realJSOP27-Feb-10 8:06 
GeneralRe: How to convers list type Pin
Luc Pattyn27-Feb-10 8:18
sitebuilderLuc Pattyn27-Feb-10 8:18 
GeneralRe: How to convers list type Pin
#realJSOP27-Feb-10 8:21
professional#realJSOP27-Feb-10 8:21 

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.