D
Dean Slindee
The code below is being used to launch WinWord.exe from a VB.NET program.
Word launches, but displays this error message:
"Word has experienced an error trying to open the file. Try these
suggestions. 1) Check the file permissions for the document or drive. 2)
Make sure there is sufficient free memory and disk space. 3) Open the file
with the Text Recovery converter."
The document that I want to display is on my PC and was created by me. I
ultimately want to open the document in READONLY mode, if possible. Is
there a security switch in the Process.Start statement that I can set to
override the error message?
Here is the code:
Private Sub frmAppointmentWorker_HelpRequested(ByVal sender As Object,
ByVal hlpevent As System.Windows.Forms.HelpEventArgs) Handles
MyBase.HelpRequested
Dim strHelpDocumentPath As String
'determine whether a Help file exists
strHelpDocumentPath = gstrHelpPath & Me.Name & ".doc"
If File.Exists(strHelpDocumentPath) Then
'launch Word
Process.Start("WinWord.exe", strHelpDocumentPath)
'Process.Start("WinWord.exe", "C:\Projects\Human
Services\Documents\Help\frmAppointmentWorker.doc")
Else
MessageBox.Show("A Help document for " & Me.Name & " does not yet
exist.", "Help document not found", MessageBoxButtons.OK,
MessageBoxIcon.Information)
End If
hlpevent.Handled = True
End Sub
Thanks in advance,
Dean Slindee
Word launches, but displays this error message:
"Word has experienced an error trying to open the file. Try these
suggestions. 1) Check the file permissions for the document or drive. 2)
Make sure there is sufficient free memory and disk space. 3) Open the file
with the Text Recovery converter."
The document that I want to display is on my PC and was created by me. I
ultimately want to open the document in READONLY mode, if possible. Is
there a security switch in the Process.Start statement that I can set to
override the error message?
Here is the code:
Private Sub frmAppointmentWorker_HelpRequested(ByVal sender As Object,
ByVal hlpevent As System.Windows.Forms.HelpEventArgs) Handles
MyBase.HelpRequested
Dim strHelpDocumentPath As String
'determine whether a Help file exists
strHelpDocumentPath = gstrHelpPath & Me.Name & ".doc"
If File.Exists(strHelpDocumentPath) Then
'launch Word
Process.Start("WinWord.exe", strHelpDocumentPath)
'Process.Start("WinWord.exe", "C:\Projects\Human
Services\Documents\Help\frmAppointmentWorker.doc")
Else
MessageBox.Show("A Help document for " & Me.Name & " does not yet
exist.", "Help document not found", MessageBoxButtons.OK,
MessageBoxIcon.Information)
End If
hlpevent.Handled = True
End Sub
Thanks in advance,
Dean Slindee