|
-
Feb 14th, 2000, 11:04 PM
#1
Thread Starter
New Member
I want to open an external application such as MS Word when a user clicks on a control button. Does anyone have some code that would help please???
-
Feb 14th, 2000, 11:23 PM
#2
Frenzied Member
Look in the help for the Shell command - you use this to run external applications.
eg;
X=Shell("winword.exe",1)
should run Microsoft Word.
------------------
Mark "Buzby" Beeton
VB Developer
[email protected]
-
Feb 15th, 2000, 04:38 AM
#3
Hyperactive Member
You can also use the ShellExecute API if you want to open a specific file.
Wade
-
Feb 15th, 2000, 08:40 AM
#4
Lively Member
Private Sub Command1_Click()
Dim shellProgram As String
Dim res
shellProgram = "C:\WINWORD.EXE"
res = Shell(shellProgram, vbNormalFocus) End Sub
-
Feb 15th, 2000, 09:33 AM
#5
Member
unless Winword.exe is installed to the root directory (C:\) that won't work.
You'll need to specify the exact path of WINWORD.EXE (or using just Winword.exe should work since Windows can probably find it)...
------------------
Rapmaster
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|