D
Dikbill
Hi there,
I'm creating a synchronisation program which wil synchronise
data between Outlook and our own database.
We want our program to work with Outlook 2000 and up.
The program is made with VB 2005 to communicate with a
standalone Outlook 2000/2003 Outlook client.
The problem I have is connecting with Outlook.
When the program starts, there can be 3 situations:
1. Outlook.exe isn't running
2. Outlook is running but invisible (Application.Explorers.Count=0)
3. Outlook is running visible
This is my startup code:
olApplication = New Outlook.Application
msgbox (olApplication.Version)
Now I discribe the above 3 situations from both Outlook 2000 and 2003
---Outlook 2003 situation 1-----------------------------------------------
Outlook is started but unvisible, that's not what I want.
The program starts with no errors, I can interact with Outlook.
---Outlook 2003 situation 2-----------------------------------------------
Outlook is started but unvisible, that's not what I want.
The program starts with no errors, I can interact with Outlook.
Every time when I start my program, a new instance of Outlook.exe
is started!! That's not what I want.
---Outlook 2003 situation 3-----------------------------------------------
Outlook not started again, that's good.
The program starts with no errors, I can interact with Outlook.
This is what I want!
---Outlook 2000 situation 1-----------------------------------------------
Outlook is started but unvisible, that's not what I want.
The program starts with no errors, I can interact with Outlook.
---Outlook 2000 situation 2-----------------------------------------------
Outlook isn't started, it will give the following error when it want's to
execute
the line msgbox (olApplication.Version)
System.Runtime.InteropServices.COMException was unhandled
ErrorCode=-2146788252
Message="Exception from HRESULT: 0x800A9C64"
Source="mscorlib"
StackTrace:
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags
invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32
culture, String[] namedParameters)
at System.RuntimeType.InvokeMember(String name, BindingFlags
bindingFlags, Binder binder, Object target, Object[] providedArgs,
ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at
Microsoft.VisualBasic.CompilerServices.VBBinder.InvokeMember(String name,
BindingFlags invokeAttr, Type objType, IReflect objIReflect, Object target,
Object[] args, String[] namedParameters)
at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object
o, Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack)
at
Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object
Instance, Type Type, String MemberName, Object[] Arguments, String[]
ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)
at Outlook_CRM_Sync.AGENDA_MAIN.Opstart() in
C:\TestDotNet\CRM_sync\Outlook_CRM_Sync\Outlook_CRM_Sync\AGENDA_MAIN.vb:line
41
at Outlook_CRM_Sync.AGENDA_MAIN.AGENDA_MAIN_Load(Object sender,
EventArgs e) in
C:\TestDotNet\CRM_sync\Outlook_CRM_Sync\Outlook_CRM_Sync\AGENDA_MAIN.vb:line
23
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&
m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd,
Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Outlook_CRM_Sync.AGENDA_MAIN.Main() in
C:\TestDotNet\CRM_sync\Outlook_CRM_Sync\Outlook_CRM_Sync\AGENDA_MAIN.Designer.vb:line
2
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[]
args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
---Outlook 2000 situation 3-----------------------------------------------
Same as Outlook 2000 situation 2
What I am doing wrong????
Anyone??
Tx a lot,
Dikbill, The Netherlands
(e-mail address removed)
I'm creating a synchronisation program which wil synchronise
data between Outlook and our own database.
We want our program to work with Outlook 2000 and up.
The program is made with VB 2005 to communicate with a
standalone Outlook 2000/2003 Outlook client.
The problem I have is connecting with Outlook.
When the program starts, there can be 3 situations:
1. Outlook.exe isn't running
2. Outlook is running but invisible (Application.Explorers.Count=0)
3. Outlook is running visible
This is my startup code:
olApplication = New Outlook.Application
msgbox (olApplication.Version)
Now I discribe the above 3 situations from both Outlook 2000 and 2003
---Outlook 2003 situation 1-----------------------------------------------
Outlook is started but unvisible, that's not what I want.
The program starts with no errors, I can interact with Outlook.
---Outlook 2003 situation 2-----------------------------------------------
Outlook is started but unvisible, that's not what I want.
The program starts with no errors, I can interact with Outlook.
Every time when I start my program, a new instance of Outlook.exe
is started!! That's not what I want.
---Outlook 2003 situation 3-----------------------------------------------
Outlook not started again, that's good.
The program starts with no errors, I can interact with Outlook.
This is what I want!
---Outlook 2000 situation 1-----------------------------------------------
Outlook is started but unvisible, that's not what I want.
The program starts with no errors, I can interact with Outlook.
---Outlook 2000 situation 2-----------------------------------------------
Outlook isn't started, it will give the following error when it want's to
execute
the line msgbox (olApplication.Version)
System.Runtime.InteropServices.COMException was unhandled
ErrorCode=-2146788252
Message="Exception from HRESULT: 0x800A9C64"
Source="mscorlib"
StackTrace:
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags
invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32
culture, String[] namedParameters)
at System.RuntimeType.InvokeMember(String name, BindingFlags
bindingFlags, Binder binder, Object target, Object[] providedArgs,
ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at
Microsoft.VisualBasic.CompilerServices.VBBinder.InvokeMember(String name,
BindingFlags invokeAttr, Type objType, IReflect objIReflect, Object target,
Object[] args, String[] namedParameters)
at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object
o, Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack)
at
Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object
Instance, Type Type, String MemberName, Object[] Arguments, String[]
ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)
at Outlook_CRM_Sync.AGENDA_MAIN.Opstart() in
C:\TestDotNet\CRM_sync\Outlook_CRM_Sync\Outlook_CRM_Sync\AGENDA_MAIN.vb:line
41
at Outlook_CRM_Sync.AGENDA_MAIN.AGENDA_MAIN_Load(Object sender,
EventArgs e) in
C:\TestDotNet\CRM_sync\Outlook_CRM_Sync\Outlook_CRM_Sync\AGENDA_MAIN.vb:line
23
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&
m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd,
Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Outlook_CRM_Sync.AGENDA_MAIN.Main() in
C:\TestDotNet\CRM_sync\Outlook_CRM_Sync\Outlook_CRM_Sync\AGENDA_MAIN.Designer.vb:line
2
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[]
args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
---Outlook 2000 situation 3-----------------------------------------------
Same as Outlook 2000 situation 2
What I am doing wrong????
Anyone??
Tx a lot,
Dikbill, The Netherlands
(e-mail address removed)