Click here to Skip to main content
15,890,512 members
Home / Discussions / C#
   

C#

 
GeneralRe: get the unicode of a character in c# Pin
prasadbuddhika20-May-11 23:22
prasadbuddhika20-May-11 23:22 
QuestionNotImplementedExpression System.Collections.ListDictionaryInternal --> Error in Print-Preview in XP Pin
Pfotenhauer20-May-11 22:33
Pfotenhauer20-May-11 22:33 
AnswerRe: NotImplementedExpression System.Collections.ListDictionaryInternal --> Error in Print-Preview in XP Pin
phil.o21-May-11 0:36
professionalphil.o21-May-11 0:36 
AnswerRe: NotImplementedExpression System.Collections.ListDictionaryInternal --> Error in Print-Preview in XP Pin
Pfotenhauer21-May-11 1:20
Pfotenhauer21-May-11 1:20 
AnswerRe: NotImplementedExpression System.Collections.ListDictionaryInternal --> Error in Print-Preview in XP Pin
Luc Pattyn21-May-11 2:19
sitebuilderLuc Pattyn21-May-11 2:19 
AnswerRe: NotImplementedExpression System.Collections.ListDictionaryInternal --> Error in Print-Preview in XP Pin
Pfotenhauer21-May-11 5:26
Pfotenhauer21-May-11 5:26 
AnswerRe: NotImplementedExpression System.Collections.ListDictionaryInternal --> Error in Print-Preview in XP Pin
Luc Pattyn21-May-11 5:39
sitebuilderLuc Pattyn21-May-11 5:39 
QuestionProblem with Process.Start("WINWORD.EXE", selectedFile); [modified] Pin
_Q12_20-May-11 6:51
_Q12_20-May-11 6:51 
Problem with Process.Start("WINWORD.EXE", selectedFile);
I even put the entire path there: //string MSWordPath = @"c:\Program Files (x86)\Microsoft Office\Office14\WINWORD.EXE";
Still same result:

the path and file name is:
c:\Users\xxx\Documents\Visual Studio 2010\Projects\zMAP\bridgeWord-Html\bridgeWord-Html\bin\Debug\01 SettingsForVSC#.docx

The MSWord is lunched but these errors are thrown:
Microsoft Word
This file could not be found!
(c:\Users\xxx\Documents\Visual.doc)
(c:\Users\xxx\Documents\...\Studio.doc)
(c:\Users\xxx\Documents\...\01.doc)
(c:\Users\xxx\Documents\...\Studio.doc)
(c:\Users\xxx\Documents\...\SettingsForVSC#.doc)

And then an empty msword page is open.
[I see it breaks at the spaces in between names] ---How to fix this problem?
I wish to open not only a docx file, but a html file also,or a txt file.
thank you.

string path = Application.StartupPath;
private void button3_Click(object sender, EventArgs e)
        {
            string MSWordPath = "\"c:\\Program Files (x86)\\Microsoft Office\\Office14\\WINWORD.EXE\"";
            selectedFile = path + "\\" + listBox1.SelectedItem as string;
          //Process.Start("WINWORD.EXE", selectedFile);  -or this but the same problem
            Process.Start(MSWordPath, selectedFile);
        }


modified on Friday, May 20, 2011 1:13 PM

AnswerRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
Dave Kreskowiak20-May-11 7:02
mveDave Kreskowiak20-May-11 7:02 
GeneralRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
_Q12_20-May-11 7:25
_Q12_20-May-11 7:25 
AnswerRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
Luc Pattyn20-May-11 7:37
sitebuilderLuc Pattyn20-May-11 7:37 
GeneralRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
_Q12_20-May-11 7:45
_Q12_20-May-11 7:45 
GeneralRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
Dave Kreskowiak20-May-11 7:50
mveDave Kreskowiak20-May-11 7:50 
GeneralRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
_Q12_20-May-11 7:57
_Q12_20-May-11 7:57 
GeneralRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
Dave Kreskowiak20-May-11 11:06
mveDave Kreskowiak20-May-11 11:06 
GeneralRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
AspDotNetDev20-May-11 13:29
protectorAspDotNetDev20-May-11 13:29 
GeneralRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
Dave Kreskowiak21-May-11 3:12
mveDave Kreskowiak21-May-11 3:12 
AnswerRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
Luc Pattyn20-May-11 8:18
sitebuilderLuc Pattyn20-May-11 8:18 
GeneralRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
Dave Kreskowiak20-May-11 7:41
mveDave Kreskowiak20-May-11 7:41 
GeneralRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
_Q12_20-May-11 7:49
_Q12_20-May-11 7:49 
AnswerRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
Alan N20-May-11 7:45
Alan N20-May-11 7:45 
AnswerRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
_Q12_20-May-11 8:06
_Q12_20-May-11 8:06 
GeneralRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
Ghydo20-May-11 8:44
Ghydo20-May-11 8:44 
GeneralRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
_Q12_20-May-11 8:50
_Q12_20-May-11 8:50 
QuestionRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
Luc Pattyn20-May-11 9:11
sitebuilderLuc Pattyn20-May-11 9:11 

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.