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 ***