
Making Outlook start from application?
Hello all,
I've been trying to use CreateProcess as in the example below (from MS):
Option Explicit
Public Declare Function CreateProcess Lib "coredll.DLL" _
Alias "CreateProcessW" _
(ByVal lpApplicationName As String, _
ByVal lpCommandLine As String, _
ByVal lpProcessAttributes As Long, _
ByVal lpThreadAttributes As Long, _
ByVal bInheritHandles As Long, _
ByVal dwCreationFlags As Long, _
ByVal lpEnvironment As Long, _
ByVal lpCurrentDirectory As String, _
ByVal lpStartupInfo As Long, _
ByVal lpProcessInformation As Long) As Long
Private Sub Command1_Click()
Dim ret
ret = CreateProcess("windows\repllog.exe", "/remote", _
0, 0, False, 0, 0, "", 0, 0)
If ret = 1 Then
Label1.Caption = "Success"
Else
Label1.Caption = "Failure"
End If
End Sub What I ultimately want to do is call the Pocket Outlook components
(Tasks & Calendar in specific).I can't even get the example from MS to work
much less outlook. If returns "Failure" in the label with no other
info.There's no error per se, just the failure return code. I basically just
copy/pasted it. Do I need a reference to something?The reference to the
coredll.dll is made by code so I figured nothing else is needed. I've tried
replacing the "windows\repllog.exe" with "windows\solitare.exe" and that
won't launch the game either...Anyone? Please help me!Thanks,-Eric P.