|
-
Nov 15th, 2007, 02:06 AM
#1
Thread Starter
New Member
Run Java Application from Word Macro
How to run a Java Application from a Word Macro file using VBA?
-
Nov 15th, 2007, 02:08 AM
#2
Re: Run Java Application from Word Macro
Moved from Visual Basic FAQs
-
Nov 15th, 2007, 02:19 AM
#3
Re: Run Java Application from Word Macro
probably you can use the shellexecute api
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Nov 15th, 2007, 03:49 AM
#4
Thread Starter
New Member
Re: Run Java Application from Word Macro
 Originally Posted by westconn1
probably you can use the shellexecute api
Pls. provide the code.
-
Nov 15th, 2007, 04:31 AM
#5
Re: Run Java Application from Word Macro
Code:
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
call like
vb Code:
ShellExecute 0, "Open", filename, vbNullString, 0, SW_SHOWNORMAL
this will basically do the same as double clicking the file fileaname, you will need to add the constant sw_shownormal
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
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
|