I am pretty much following the tutorials I have found here in this forum.
even have read this about getting rid of the dam thing.
http://www.vbforums.com/showthread.php?t=347855
If I unregister the .dll it is still in the "standard" commandbar of word.
Could someone please tell me what I am doing wrong.
Code:Public WithEvents wLuTTool As Office.CommandBarButtonCode:Dim oPic As stdole.IPictureDisp Dim oMask As stdole.IPictureDisp '<LOAD THE PICTURE AND MASK OBJECTS> Set oPic = LoadResPicture(101, vbResBitmap) Set oMask = LoadResPicture(102, vbResBitmap) Set wLuTTool = w_App.CommandBars.Item("Standard").FindControl(, , "890", False, False) If TypeName(wLuTTool) = "Nothing" Then Set wLuTTool = w_App.CommandBars.Item("Standard").Controls.Add(msoControlButton, , "890", , False) End If With wLuTTool .BeginGroup = True .DescriptionText = "LuTTool - Add selected Word Document to IPAS" .Caption = "LuTTool" .Enabled = True .OnAction = "!<W2LTT2I.Connect>" .Style = msoButtonIconAndCaption .Picture = oPic '<OFFICE 2000 - 2007> .Mask = oMask '<OFFICE 2002 - 2007> .Tag = "890" .ToolTipText = getMessage("ToolTip", user_language) .Visible = True End With Set oPic = Nothing Set oMask = NothingCode:Private Sub IDTExtensibility2_OnBeginShutdown(custom() As Variant) 'The OnBeginShutdown method is called while the environment is being shut down. The custom parameter is an array 'that can be used to provide additional data to the OnBeginShutdown method if desired. If TypeName(wLuTTool) <> "Nothing" Then wLuTTool.Delete False End If Set wLuTTool = Nothing End SubIn the above I have been playing around with the Temporary property of the button it is "False" in the above but I have also tried "True" which is originally what it was.Code:Private Sub IDTExtensibility2_OnDisconnection(ByVal RemoveMode As AddInDesignerObjects.ext_DisconnectMode, _ custom() As Variant) 'The OnDisconnection method is called when the managed COM add-in is unloaded, such as when the user closes the 'host application. The custom parameter is an array that can be used to provide additional data to the OnDisconnection 'method if desired. The RemoveMode parameter is an ext_dm constant that indicates how the managed COM add-in was unloaded. If TypeName(wLuTTool) <> "Nothing" Then wLuTTool.Delete False End If Set wLuTTool = Nothing End Sub


Reply With Quote