Advertisement
Advertisement
| 04.09.2008 at 03:07AM PDT, ID: 23307577 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: |
Public Sub OpenDocument(ByVal FilePath As String, Optional ByVal bUseShellExec As Boolean = True, Optional ByVal bPrint As Boolean = False) 'MsgBox(FilePath) Dim Print As New System.Diagnostics.ProcessStartInfo 'Verb is being always used as "open" If bPrint = False Then Print.Verb = "open" Else Print.Verb = "Print" End If Print.WindowStyle = ProcessWindowStyle.Maximized Print.FileName = FilePath Print.UseShellExecute = bUseShellExec Try System.Diagnostics.Process.Start(Print) Catch ex As System.ComponentModel.Win32Exception MsgBox(ex.Message & vbCrLf & ex.StackTrace) End Try End Sub |