Matt Driver
Matt
Posts: 152
Joined: 2004-08-17
|
Hi
Had an odd problem which I hope someone has some ideas on. I have a button on a command bar in outlook that displays a simple messagebox which works in both debug and end application modes perfectly.
Another button has the following code:
Dim Connected As Boolean
Dim Piv_Form As Relationship_Form = New Relationship_Form
MsgBox("attempting to connect to Pivotal", MsgBoxStyle.Information, "Status of Connection to pivotal")
Piv_Form.RelCache.ConnectionName = "i2 Ltd Offline"
Piv_Form.RelCache.DisplayUI = True
Piv_Form.RelCache.Visible = True
Connected = Piv_Form.RelCache.Connect
MsgBox(Connected, MsgBoxStyle.Information, "Status of Connection to pivotal")
Connected = Piv_Form.RelCache.Disconnect
Piv_Form = Nothing
MsgBox("Disconnected from Pivotal", MsgBoxStyle.Information, "Status of Connection to pivotal")
It puts a messagebox on the screen then connects to our CRM system and then disconnects. The problem is that it connects perfectly in Debug mode but when run in Outlook as a standalone app the button does absolutely nothing. The button with the simple messagebox works perfectly. :?:
I am using Visual studio 2003 with XP SP2.
Matt |
|
Sergey Grischenko
Add-in Express team
Posts: 7233
Joined: 2004-07-05
|
Hi,
Try to inclose your code into Try ... Catch.
May be you get an exception there.
Or try to put the following line
< MsgBox("attempting to connect to Pivotal", MsgBoxStyle.Information, "Status of Connection to pivotal" > before < Dim Piv_Form As Relationship_Form = New Relationship_Form >.
|
|
Matt Driver
Matt
Posts: 152
Joined: 2004-08-17
|
Hi
After un-registering the Outlook add-in from Outlook that I had build and uninstalling my program and then rebuilding and re-installing it works without debug mode.
It appears the simply un-installing the Outlook addin from Outlook then rebuilding and intalling over the top does of the existing install does not push the latest code into outlook.
Got it working now.
Matt |
|
Sergey Grischenko
Add-in Express team
Posts: 7233
Joined: 2004-07-05
|
Matt,
Before changing the configuration from Debug to Release you should unregister the Debug version of an add-in and only then register its Release version.
Good luck. |
|