Hello Jasper,
Jasper Recto schrieb:
> How can I make a generic command that will open up the file in its native
> program. That way an excel file will open in excel, etc...
something like this?
Public Const WIN_NORMAL = 1 'Open Normal
Public Const WIN_MAX = 3 'Open Maximized
Public Const WIN_MIN = 2 'Open Minimized
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long,
ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String,
ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Sub TestEx
TheFile = "C:\YourPath\YourFile.pdf"
ShellExecute(hWndAccessApp, vbNullString, TheFile, vbNullString, vbNullString, WIN_MAX)
End Sub
>> Stay informed about: VB Command