perpetual_dream

Hello,

I have this outlook addin which adds a button to microsoft outlook. Once the user clicks on the button it opens a form. I can run the addin successfully. Here is my code:

Code Snippet

public class ThisAddIn

Private _cbBar As Office.CommandBar

Private WithEvents _cbButton As Office.CommandBarButton

Private Sub ThisAddIn_Startup(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Startup

Dim explorer As outlook.Explorer = Me.Application.ActiveExplorer

_cbBar = explorer.CommandBars.Add("SO.dms", Office.MsoBarPosition.msoBarTop, False, True)

_cbButton = CType(_cbBar.Controls.Add(Office.MsoControlType.msoControlButton), Office.CommandBarButton)

_cbButton.Caption = "SO.dms"

_cbButton.Style = Microsoft.Office.Core.MsoButtonStyle.msoButtonCaption

_cbBar.Visible = True

explorer = Nothing

End Sub

Private Sub ThisAddIn_Shutdown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shutdown

_cbButton.Delete()

_cbButton = Nothing

End Sub

Private Sub _cbButton_Click(ByVal Ctrl As Microsoft.Office.Core.CommandBarButton, ByRef CancelDefault As Boolean) Handles _cbButton.Click

Dim docsave2 As New ChooseProjectform

docsave2.ShowDialog()

end sub

end class

Now, I have tried to create a setup project that installs the addin and adds the button to the outlook toolbar by right clicking on the setup icon and clicking "build". However, After I ran the setup file, when I opened outlook I discovered that the button was never added to outlook toolbar.The button gets added only when I debug the project from within visual studio. But It is removed if I uninstall the addin through add/remove programs!! Am I doing something wrong Is it the right way to deploy outlook applications

Thanks



Re: Visual Studio Tools for Office Deploying this outlook addin

perpetual_dream

I have found the solution in this article: http://www.codeproject.com/office/Outlook_Add-in_Issues.asp

It has to do with setup access code security .....

Thanks

Bye