| | |
Create Add-in for Outlook 2007
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Sep 2007
Posts: 8
Reputation:
Solved Threads: 0
i have created add-in for Outlook 2007 . but when i run outlook the commandbar button which should be appear on standard bar , does not appear.
i think there is a problem in register of Add-in.
the code are as follows :
please tell me , what is the problem in this ?
Thanks !
i think there is a problem in register of Add-in.
the code are as follows :
VB.NET Syntax (Toggle Plain Text)
imports Extensibility Imports System.Runtime.InteropServices Imports Microsoft.Office.Core Imports Microsoft.Office.Interop #Region " Read me for Add-in installation and setup information. " ' When run, the Add-in wizard prepared the registry for the Add-in. ' At a later time, if the Add-in becomes unavailable for reasons such as: ' 1) You moved this project to a computer other than which is was originally created on. ' 2) You chose 'Yes' when presented with a message asking if you wish to remove the Add-in. ' 3) Registry corruption. ' you will need to re-register the Add-in by building the $SAFEOBJNAME$Setup project, ' right click the project in the Solution Explorer, then choose install. #End Region <GuidAttribute("F5F9500E-08F4-4391-B2F7-29FDE0BB4C23"), ProgIdAttribute("ISOLAddin.Connect")> _ Public Class Connect Implements Extensibility.IDTExtensibility2 Dim applicationObject As Object Dim addInInstance As Object Dim WithEvents MyButton As Microsoft.Office.Core.CommandBarButton Dim OApp As Outlook.Application Public Sub OnBeginShutdown(ByRef custom As System.Array) Implements Extensibility.IDTExtensibility2.OnBeginShutdown MsgBox("Our custom Add-in is unloading.") MyButton.Delete() MyButton = Nothing End Sub Public Sub OnAddInsUpdate(ByRef custom As System.Array) Implements Extensibility.IDTExtensibility2.OnAddInsUpdate End Sub Public Sub OnStartupComplete(ByRef custom As System.Array) Implements Extensibility.IDTExtensibility2.OnStartupComplete Dim ComBar As CommandBars Dim StdBar As CommandBar Dim OAppExpl As Outlook.Explorer OAppExpl = CType(OApp.ActiveExplorer, Outlook.Explorer) ComBar = OAppExpl.CommandBars If ComBar Is Nothing Then ComBar = OApp.ActiveExplorer.CommandBars End If ComBar = applicationObject.CommandBars() StdBar = ComBar.Item("Standard") If StdBar Is Nothing Then StdBar = ComBar.Item("Database") End If MyButton = CType(StdBar.FindControl(Tag:="My Custom Button"), CommandBarButton) If MyButton Is Nothing Then MyButton = CType(StdBar.Controls.Add(Type:=MsoControlType.msoControlButton, Temporary:=False), CommandBarButton) With MyButton .Caption = "My Custom Button" .Style = MsoButtonStyle.msoButtonCaption .Tag = "My Custom Button" .OnAction = "!<ISOLAddin.connect>" .Visible = True End With End If MsgBox("Started in " & OApp.Name & ".") ComBar = Nothing StdBar = Nothing End Sub Public Sub OnDisconnection(ByVal RemoveMode As Extensibility.ext_DisconnectMode, ByRef custom As System.Array) Implements Extensibility.IDTExtensibility2.OnDisconnection If RemoveMode <> ext_DisconnectMode.ext_dm_HostShutdown Then Call OnBeginShutdown(custom) End If OApp = Nothing End Sub Public Sub OnConnection(ByVal application As Object, ByVal connectMode As Extensibility.ext_ConnectMode, ByVal addInInst As Object, ByRef custom As System.Array) Implements Extensibility.IDTExtensibility2.OnConnection MsgBox("On Connection In MyAddin") applicationObject = application addInInstance = addInInst If connectMode <> ext_ConnectMode.ext_cm_Startup Then Call OnStartupComplete(custom) End If End Sub Private Sub MyButton_Click(ByVal Ctrl As Microsoft.Office.Core.CommandBarButton, ByRef CancelDefault As Boolean) Handles MyButton.Click MsgBox("Our CommandBar button was pressed!") End Sub End Class
Thanks !
Last edited by Ancient Dragon; Feb 5th, 2009 at 6:47 pm. Reason: add code tags
•
•
Join Date: Dec 2008
Posts: 12
Reputation:
Solved Threads: 2
http://www.outlooktrackit.com <--- I love this toolbar, Outlook Track-It. I want to create something just like this that reminds the user to followup to emails. It's so simple...and perfect. Any suggestions???
![]() |
Similar Threads
- Outlook 2007 Saving Embedded Pictures (Windows Software)
- create an appointment in outlook using VB.NET (VB.NET)
- Synchronize Outlook with Entourage (Mac Software)
- Outlook 2007: sub-tasks?? how? (Windows Software)
- Does Gmail work with Microsoft Outlook 2007? (Windows Software)
- Outlook 2007 Beta Anti-Spam (Windows Software)
- How to send an apointment from PPC app. to Outlook (VB.NET)
- Outlook for eMail, confusing, (Windows Software)
- How to Add Contacts to i730 Phone (Geeks' Lounge)
Other Threads in the VB.NET Forum
- Previous Thread: deployment
- Next Thread: Datagrid MS Access and VB.Net
| Thread Tools | Search this Thread |
.net .net2008 2005 2008 access account arithmetic array basic bing button buttons c# center check code combobox component convert crystalreport data database datagrid datagridview date dissertation dissertations dropdownlist excel fade file-dialog filter ftp generatetags google gridview hardcopy images inline input insert intel internet listview mobile monitor ms net networking objects output panel passingparameters picturebox picturebox1 port position print printing problem problemwithinstallation project read remove save searchbox searchvb.net select serial server shutdown soap survey table tcp temperature text textbox timer timespan toolbox trim update updown user vb vb.net vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web winforms wpf year






