CloseOpen a non-executable file in VBA
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
Declare Function GetDesktopWindow Lib "user32" () As Long
sub mySub()
Call ShellExecute(GetDesktopWindow(), "Open", myTempPath & TempFileName, "", myTempPath, 1)
end sub
Tagged with vba execute html reference office 2010