![]() |
|
|
Welcome to the { mindfrost82.com } forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Re: Some help please
You can use a standard "shellexec" function, such as this one...
Private Declare Function GetDesktopWindow Lib "user32" () As Long 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 Public Const SW_SHOWNORMAL = 3 Public Function RunFile(ByVal strDocName As String) As Long Dim RunAssociateFile As Long Dim Scr_hDC As Long Dim lngRes As Long Scr_hDC = GetDesktopWindow() RunAssociateFile = ShellExecute(Scr_hDC, "Open", strDocName, "", "C:\", SW_SHOWNORMAL) End Function Use: Call RunFile(filename As String) That will open the file you specify, with the program thats associated to it. "Pyrforos" <someone@mail.gr> wrote in message news:fq4bt1$14iv$1@ulysses.noc.ntua.gr... > How can I load a document (word,pdf) with the program that loads it > normally? > > Thanks in advance > |
|
|||
|
Re: Some help please
You can use a standard "shellexec" function, such as this one...
Private Declare Function GetDesktopWindow Lib "user32" () As Long 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 Public Const SW_SHOWNORMAL = 3 Public Function RunFile(ByVal strDocName As String) As Long Dim RunAssociateFile As Long Dim Scr_hDC As Long Dim lngRes As Long Scr_hDC = GetDesktopWindow() RunAssociateFile = ShellExecute(Scr_hDC, "Open", strDocName, "", "C:\", SW_SHOWNORMAL) End Function Use: Call RunFile(filename As String) That will open the file you specify, with the program thats associated to it. "Pyrforos" <someone@mail.gr> wrote in message news:fq4bt1$14iv$1@ulysses.noc.ntua.gr... > How can I load a document (word,pdf) with the program that loads it > normally? > > Thanks in advance > |
|
|||
|
Re: Some help please
You can use a standard "shellexec" function, such as this one...
Private Declare Function GetDesktopWindow Lib "user32" () As Long 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 Public Const SW_SHOWNORMAL = 3 Public Function RunFile(ByVal strDocName As String) As Long Dim RunAssociateFile As Long Dim Scr_hDC As Long Dim lngRes As Long Scr_hDC = GetDesktopWindow() RunAssociateFile = ShellExecute(Scr_hDC, "Open", strDocName, "", "C:\", SW_SHOWNORMAL) End Function Use: Call RunFile(filename As String) That will open the file you specify, with the program thats associated to it. "Pyrforos" <someone@mail.gr> wrote in message news:fq4bt1$14iv$1@ulysses.noc.ntua.gr... > How can I load a document (word,pdf) with the program that loads it > normally? > > Thanks in advance > |
|
|||
|
Re: Some help please
You can use a standard "shellexec" function, such as this one...
Private Declare Function GetDesktopWindow Lib "user32" () As Long 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 Public Const SW_SHOWNORMAL = 3 Public Function RunFile(ByVal strDocName As String) As Long Dim RunAssociateFile As Long Dim Scr_hDC As Long Dim lngRes As Long Scr_hDC = GetDesktopWindow() RunAssociateFile = ShellExecute(Scr_hDC, "Open", strDocName, "", "C:\", SW_SHOWNORMAL) End Function Use: Call RunFile(filename As String) That will open the file you specify, with the program thats associated to it. "Pyrforos" <someone@mail.gr> wrote in message news:fq4bt1$14iv$1@ulysses.noc.ntua.gr... > How can I load a document (word,pdf) with the program that loads it > normally? > > Thanks in advance > |
|
|||
|
Re: Some help please
Thanks a lot. I 'll try that.
"Reverend Fuzzy" <cajuncoiler@spamless.msbdatasystems.com> wrote in message news:s4GdnfKnrqZvKVjanZ2dnUVZ_vamnZ2d@comcast.com. .. > You can use a standard "shellexec" function, such as this one... > > Private Declare Function GetDesktopWindow Lib "user32" () As Long > 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 > Public Const SW_SHOWNORMAL = 3 > Public Function RunFile(ByVal strDocName As String) As Long > Dim RunAssociateFile As Long > Dim Scr_hDC As Long > Dim lngRes As Long > Scr_hDC = GetDesktopWindow() > RunAssociateFile = ShellExecute(Scr_hDC, "Open", strDocName, "", "C:\", > SW_SHOWNORMAL) > End Function > > Use: Call RunFile(filename As String) > That will open the file you specify, with the program thats associated to > it. > > > "Pyrforos" <someone@mail.gr> wrote in message > news:fq4bt1$14iv$1@ulysses.noc.ntua.gr... >> How can I load a document (word,pdf) with the program that loads it >> normally? >> >> Thanks in advance >> > > |
|
|||
|
Re: Some help please
Thanks a lot. I 'll try that.
"Reverend Fuzzy" <cajuncoiler@spamless.msbdatasystems.com> wrote in message news:s4GdnfKnrqZvKVjanZ2dnUVZ_vamnZ2d@comcast.com. .. > You can use a standard "shellexec" function, such as this one... > > Private Declare Function GetDesktopWindow Lib "user32" () As Long > 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 > Public Const SW_SHOWNORMAL = 3 > Public Function RunFile(ByVal strDocName As String) As Long > Dim RunAssociateFile As Long > Dim Scr_hDC As Long > Dim lngRes As Long > Scr_hDC = GetDesktopWindow() > RunAssociateFile = ShellExecute(Scr_hDC, "Open", strDocName, "", "C:\", > SW_SHOWNORMAL) > End Function > > Use: Call RunFile(filename As String) > That will open the file you specify, with the program thats associated to > it. > > > "Pyrforos" <someone@mail.gr> wrote in message > news:fq4bt1$14iv$1@ulysses.noc.ntua.gr... >> How can I load a document (word,pdf) with the program that loads it >> normally? >> >> Thanks in advance >> > > |
|
|||
|
Re: Some help please
Thanks a lot. I 'll try that.
"Reverend Fuzzy" <cajuncoiler@spamless.msbdatasystems.com> wrote in message news:s4GdnfKnrqZvKVjanZ2dnUVZ_vamnZ2d@comcast.com. .. > You can use a standard "shellexec" function, such as this one... > > Private Declare Function GetDesktopWindow Lib "user32" () As Long > 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 > Public Const SW_SHOWNORMAL = 3 > Public Function RunFile(ByVal strDocName As String) As Long > Dim RunAssociateFile As Long > Dim Scr_hDC As Long > Dim lngRes As Long > Scr_hDC = GetDesktopWindow() > RunAssociateFile = ShellExecute(Scr_hDC, "Open", strDocName, "", "C:\", > SW_SHOWNORMAL) > End Function > > Use: Call RunFile(filename As String) > That will open the file you specify, with the program thats associated to > it. > > > "Pyrforos" <someone@mail.gr> wrote in message > news:fq4bt1$14iv$1@ulysses.noc.ntua.gr... >> How can I load a document (word,pdf) with the program that loads it >> normally? >> >> Thanks in advance >> > > |
|
|||
|
Re: Some help please
Thanks a lot. I 'll try that.
"Reverend Fuzzy" <cajuncoiler@spamless.msbdatasystems.com> wrote in message news:s4GdnfKnrqZvKVjanZ2dnUVZ_vamnZ2d@comcast.com. .. > You can use a standard "shellexec" function, such as this one... > > Private Declare Function GetDesktopWindow Lib "user32" () As Long > 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 > Public Const SW_SHOWNORMAL = 3 > Public Function RunFile(ByVal strDocName As String) As Long > Dim RunAssociateFile As Long > Dim Scr_hDC As Long > Dim lngRes As Long > Scr_hDC = GetDesktopWindow() > RunAssociateFile = ShellExecute(Scr_hDC, "Open", strDocName, "", "C:\", > SW_SHOWNORMAL) > End Function > > Use: Call RunFile(filename As String) > That will open the file you specify, with the program thats associated to > it. > > > "Pyrforos" <someone@mail.gr> wrote in message > news:fq4bt1$14iv$1@ulysses.noc.ntua.gr... >> How can I load a document (word,pdf) with the program that loads it >> normally? >> >> Thanks in advance >> > > |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|