Click here to Skip to main content
15,909,741 members
Home / Discussions / C#
   

C#

 
QuestionDllImport issue in c sharp Pin
shivamkalra22-May-11 9:45
shivamkalra22-May-11 9:45 
AnswerRe: DllImport issue in c sharp Pin
Luc Pattyn22-May-11 10:17
sitebuilderLuc Pattyn22-May-11 10:17 
AnswerRe: DllImport issue in c sharp Pin
Mark Salsbery22-May-11 12:59
Mark Salsbery22-May-11 12:59 
GeneralRe: DllImport issue in c sharp Pin
shivamkalra22-May-11 15:51
shivamkalra22-May-11 15:51 
QuestionRe: DllImport issue in c sharp Pin
Mark Salsbery22-May-11 16:03
Mark Salsbery22-May-11 16:03 
AnswerRe: DllImport issue in c sharp Pin
Luc Pattyn22-May-11 16:22
sitebuilderLuc Pattyn22-May-11 16:22 
GeneralRe: DllImport issue in c sharp Pin
Mark Salsbery22-May-11 16:40
Mark Salsbery22-May-11 16:40 
AnswerRe: DllImport issue in c sharp Pin
Luc Pattyn22-May-11 16:52
sitebuilderLuc Pattyn22-May-11 16:52 
AnswerRe: DllImport issue in c sharp Pin
shivamkalra22-May-11 16:33
shivamkalra22-May-11 16:33 
GeneralRe: DllImport issue in c sharp Pin
Mark Salsbery22-May-11 16:41
Mark Salsbery22-May-11 16:41 
QuestionHow to have a common Subs for the same use? C# 2010 Pin
Paramu197322-May-11 4:58
Paramu197322-May-11 4:58 
AnswerRe: How to have a common Subs for the same use? C# 2010 Pin
Luc Pattyn22-May-11 5:01
sitebuilderLuc Pattyn22-May-11 5:01 
AnswerRe: How to have a common Subs for the same use? C# 2010 Pin
Pete O'Hanlon22-May-11 5:04
mvePete O'Hanlon22-May-11 5:04 
GeneralRe: How to have a common Subs for the same use? C# 2010 Pin
Paramu197322-May-11 5:13
Paramu197322-May-11 5:13 
GeneralRe: How to have a common Subs for the same use? C# 2010 Pin
Pete O'Hanlon22-May-11 8:29
mvePete O'Hanlon22-May-11 8:29 
Questionc# Problem with webbrowser control loading local images Pin
_Q12_22-May-11 3:54
_Q12_22-May-11 3:54 
AnswerRe: c# Problem with webbrowser control loading local images Pin
Dalek Dave22-May-11 4:27
professionalDalek Dave22-May-11 4:27 
GeneralRe: c# Problem with webbrowser control loading local images [modified] Pin
_Q12_22-May-11 4:31
_Q12_22-May-11 4:31 
AnswerRe: c# Problem with webbrowser control loading local images [modified] Pin
Luc Pattyn22-May-11 5:07
sitebuilderLuc Pattyn22-May-11 5:07 
AnswerRe: c# Problem with webbrowser control loading local images Pin
Luc Pattyn22-May-11 5:30
sitebuilderLuc Pattyn22-May-11 5:30 
GeneralRe: c# Problem with webbrowser control loading local images Pin
Mark Salsbery22-May-11 5:32
Mark Salsbery22-May-11 5:32 
GeneralRe: c# Problem with webbrowser control loading local images Pin
_Q12_22-May-11 7:12
_Q12_22-May-11 7:12 
AnswerRe: c# Problem with webbrowser control loading local images Pin
#realJSOP23-May-11 1:47
professional#realJSOP23-May-11 1:47 
QuestionClose wrod corrctly, it's possile? Pin
abbd21-May-11 13:49
abbd21-May-11 13:49 
Hello,

I create 4000 files word like this :

foreach (string s in FUSIONSS_1)
            {   
                
 
                String[] tbStr2 = s.Split(new Char[] { ';' });
                string nb = tbStr2[0];
                Object oMissing = System.Reflection.Missing.Value;
                Object oTrue = true;
                Object oFalse = false;
                Microsoft.Office.Interop.Word.Application oWord = new Microsoft.Office.Interop.Word.Application();
                Microsoft.Office.Interop.Word.Document oWordDoc = new Microsoft.Office.Interop.Word.Document();
                oWord.Visible = true;
                oWord.Visible = false;
                Object oTemplatePath = modelee;
                oWordDoc = oWord.Documents.Add(ref oTemplatePath, ref oMissing, ref oMissing, ref oMissing);
                bool sympb = false; bool E = false; bool n = false; bool p = false; bool r = false;
               
                foreach (Microsoft.Office.Interop.Word.Range range in oWordDoc.Words)
                {if (range.Text.Trim().Contains("P"))
                    {   int pos = range.Text.Trim().IndexOf("P");
                        string str = range.Text.Trim().Replace("P", "O");
                        range.Text = str;} }
                Directory.CreateDirectory((Object)path + "./PUBLI/" + nb);
                Object oSaveAsFile = (Object)path + "./PUBLI/" + nb + "/" + nb + ".doc";
                oWordDoc.SaveAs(ref oSaveAsFile, 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);
                oWordDoc.Close(ref oFalse, ref  oMissing, ref oMissing);
                oWord.Quit(ref oMissing, ref oMissing, ref oMissing);
            }



unfortunately the process winword.exe don't be kill on the task manager of my server.
How i can close the word file correctly?, thank you verry mutch.
AnswerRe: Close wrod corrctly, it's possile? Pin
Luc Pattyn21-May-11 14:14
sitebuilderLuc Pattyn21-May-11 14:14 

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.