|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Opening word with Process.startgive me a error that says: Word experienced an error Try suggestions: * check the file permissions * Make sure there is sufficient free memory * Open the file with the text recovery I think it is some thing with word. Any suggestions?? Thanks Tom He is my code Dim diWord As DirectoryInfo = New DirectoryInfo("C:\ProgramFiles\Microsoft Office\Office11\WINWORD.exe") If diWord.Exists Then wrdApp = "C:\Program Files\Microsoft Office\Office11\WINWORD.exe" Else wrdApp = "C:\Program Files\Microsoft Outlook\Office11\WINWORD.exe" End If 'set open dialog properties With Me.OpenFileDialog1 .Filter = "PDF (*.pdf) | *.pdf|all files (*.*)|*.* | Word Documents (*.doc) | *.doc" .FilterIndex = 3 .InitialDirectory = path .Title = "Open File Dialog" End With 'show the open dialog and if the user click the ok button 'load the file If Me.OpenFileDialog1.ShowDialog = DialogResult.OK Then 'Get File name strFileName = Me.OpenFileDialog1.FileName MsgBox(Me.OpenFileDialog1.FileName) Process.Start(wrdApp, strFileName) End If End Sub *** Sent via Developersdex http://www.developersdex.com *** Write down the command to see if it looks correct? You could also launch the
..doc file. It will launch the associated Word application... -- Show quoteHide quotePatrice "Thomas Beyerlein" <tb***@yahoo.com> a écrit dans le message de news:O69VTylMGHA.536@TK2MSFTNGP09.phx.gbl... > > I am trying to open word with process.start but when it opens word it > give me a error that says: > Word experienced an error > Try suggestions: > * check the file permissions > * Make sure there is sufficient free memory > * Open the file with the text recovery > > I think it is some thing with word. Any suggestions?? > > Thanks > Tom > > He is my code > > Dim diWord As DirectoryInfo = New > DirectoryInfo("C:\ProgramFiles\Microsoft Office\Office11\WINWORD.exe") > If diWord.Exists Then > wrdApp = "C:\Program Files\Microsoft Office\Office11\WINWORD.exe" > Else > wrdApp = "C:\Program Files\Microsoft Outlook\Office11\WINWORD.exe" > End If > 'set open dialog properties > With Me.OpenFileDialog1 > Filter = "PDF (*.pdf) | *.pdf|all files (*.*)|*.* | Word Documents > (*.doc) | *.doc" > FilterIndex = 3 > InitialDirectory = path > Title = "Open File Dialog" > End With > > 'show the open dialog and if the user click the ok button > 'load the file > If Me.OpenFileDialog1.ShowDialog = DialogResult.OK Then > > 'Get File name > strFileName = Me.OpenFileDialog1.FileName > MsgBox(Me.OpenFileDialog1.FileName) > > Process.Start(wrdApp, strFileName) > > End If > > End Sub > > > > *** Sent via Developersdex http://www.developersdex.com ***
Resize problem (in IDE)
Broken References check point inside "cirkle" (basketball) Exposing properties of a class within a class Windows Services works for years/months/weeks, then chokes New bee:How do i make an .exe file in VS 2005? DimeAttachment save to disk Count lines in multi-line textbox Can't Figure Out Correct Syntax Using a Structure in a Class |
|||||||||||||||||||||||