I'm using Word automation in my VB6 application.*What i want to do:-I have several textbox shap...
By lvermeersch
in the VB program, i want bring up a excel sheet ( visible = true) and fill in some items, let user ...
By leonid_cn2006
Hi!I hope you can help me.My questions are:1) How to run a stored proc from Excel VBA and get the da...
By jtammyg
Hi,Im a newb so please bear with me:)Ive opened a query with VBA and I want to make some of the colu...
By naughtydog
Ok, can anyone help me with this prob? I dont understand how this can happen. Oh yeah, I am using VB...
By oct_7
how can I print the data from texbox to the cells of flexgridand thankyou for help...
By nader
wish All The Users Of The Forum....old And New A Very Happy And A Prosperous New Year ;) ;)...
By gayomard_mehta
In a User-Defined Class:For "derived" properties, rather than base properties, is there any differen...
By dkenny, 1 Comments
Hiwell i want to calculate the number of minutes present in this time ( 23:45:06 )this is time is in...
By dastard, 3 Comments
How do I reliably switch between Office applications using code? I have an excel workbook that when...
By mpselby, 3 Comments
Is it possible to force Excel to close if Macros aren't enabled after opening some file?...
By fonty, 1 Comments
Hi all,I have such a problem:I have a scrollbar on worksheet, but I don't know how to assign a ...
By sweet_dreams, 2 Comments
Hello,I'm very inexperienced to VB programming, actually merely using some code I was given by ...
By sundboell, 1 Comments
Hello,Im developing an Excel application using ActiveX controls (Checkboxes, Optionbuttons, Textfiel...
By m_haitz, 5 Comments
hi alli want to add new rows ...but when i use the codeIf Selection.Information(wdWithInTable) = Tru...
By kmsantosh, 5 Comments
no one any idea ? :cry:
sigik | Thurs, 06 Dec 2007 11:39:56 GMT |
What does your addin do? Does it show up in the disabled items list?
robdog888 | Thurs, 06 Dec 2007 11:40:56 GMT |
after loading, the add-in should insert a command-button (and it did already ...)
<GuidAttribute("93DC22DF-EBC3-4018-8DB6-338C4F43457C"), ProgIdAttribute("Carizma OutlookAddin.Connect")> _
Public Class Connect
Implements Extensibility.IDTExtensibility2
'DECLARE OUT BUTTONS EVENT SO WE CAN HANDLE IT IN OUR ADDIN>
Public WithEvents Carizma As CommandBarButton
Public WithEvents SentItemsAdd As Outlook.Items
Public WithEvents ApplicationObject As Outlook.Application
Dim addInInstance As Object
Dim KZ_First As String
Dim KZ_ok As Boolean
Dim PathPGM As String ' PGM-Pfad von Carizma OutlookAddin
Public Sub OnStartupComplete(ByRef custom As System.Array) Implements Extensibility.IDTExtensibility2.OnStartupComplete
'The OnAction property is optional but recommended. It should be set to the ProgID of the add-in, so that if
'the add-in is not loaded when a user clicks the button, MSO loads the add-in automatically and then raises
'the Click event for the add-in to handle.
'SET OUT TOOLBAR BUTTON IN THIS EVENT AS ITS THE LAST TO FIRE SO OUTLOOK WILL BE COMPLETELY LOADED AND STARTED>
' Wenn kein Explorer-Objekt existiert, wird auch kein Button erzeugt
' MsgBox("OnStartupComplete")
If ApplicationObject.ActiveExplorer Is Nothing Then Exit Sub
Try
Dim RegKey As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\Solarys\Carizma\OutlookAddIn", False)
PathPGM = RegKey.GetValue("PathPGM").ToString
'Ordner fr "gesendet" ermitteln
SentItemsAdd = ApplicationObject.GetNamespace("MAPI").GetDefaultFolder(Outlook.OlDefaultFolders.olFolderSentMail).Items
'CHECK IF OUR BUTTON ALREADY HAS BEEN ADDED>
Carizma = ApplicationObject.ActiveExplorer.CommandBars("Standard").FindControl( _
Microsoft.Office.Core.MsoControlType.msoControlButton, , "891", False, True)
If Carizma Is Nothing Then
' MsgBox("new button ...")
' Icon fr Button zusammenstellen
Dim CarizmaPic As New System.Drawing.Bitmap(PathPGM & "\Carizma.ms1")
Dim CarizmaMsk As New System.Drawing.Bitmap(PathPGM & "\Carizma.ms2")
' Button auf Standard-Toolbar hinzufgen
Carizma = ApplicationObject.ActiveExplorer.CommandBars("Standard").Controls.Add( _
Microsoft.Office.Core.MsoControlType.msoControlButton, , "891", , False)
' Eigenschaften des Buttons setzen
With Carizma
.BeginGroup = True
.Caption = "Carizma"
.DescriptionText = ""
.Enabled = True
'.FaceId = 394
.OnAction = "!<Carizma OutlookAddIn.Connect>"
.Style = MsoButtonStyle.msoButtonIconAndCaption
.Tag = "891"
.TooltipText = "eMail in Carizma ablegen"
.Picture = PictureClass.GettIPictureDispFromPicture(CarizmaPic)
.Mask = PictureClass.GettIPictureDispFromPicture(CarizmaMsk)
.Visible = True
End With
Else
' MsgBox("button exists already ...")
With Carizma
.BeginGroup = True
.Caption = "Carizma"
.DescriptionText = ""
.Enabled = True
'.FaceId = 394
.OnAction = "!<Carizma OutlookAddIn.Connect>"
.Style = MsoButtonStyle.msoButtonIconAndCaption
.Tag = "891"
.TooltipText = "eMail in Carizma ablegen"
.Visible = True
End With
End If
Catch ex As Exception ' Fehler: Button konnte nicht erzeugt werden
If Carizma Is Nothing Then
MsgBox("FEHLER: Button Carizma konnte nicht gesetzt werden.", MsgBoxStyle.Exclamation Or MsgBoxStyle.OKOnly, "Carizma OutlookAddIn")
Else
MsgBox(ex.Message.ToString, MsgBoxStyle.Exclamation Or MsgBoxStyle.OKOnly, "Carizma-Outlook AddIn")
End If
End Try
End Sub
[... some more functions ... ]
End Class
now, i neither get a button nor an error-message ?
where can i find the "disabled items list" ?
sigik | Thurs, 06 Dec 2007 11:42:06 GMT |
crazy crazy - i solved it !!!
- in march, i transferred the project from C: to an USB-harddrive (X:)
- if i build the setup on the x-drive, the add-in will only run on computers which have an assignment to X:, on a PC without a X-drive, the add-in will not load !?!?!?!?!?!?
- i transferred the project back to c: and rebuilt it: now it works without X:
strange world - perhaps a master has an explanation to me ??
sigik | Thurs, 06 Dec 2007 11:43:01 GMT |
Are you trying to write your own installer for it? Its too much work and is already a good one as shown in my FAQ on .NET Office Addins (your code looks familiar :)).
Do you have a path somewhere that is hard coded to use X?
robdog888 | Thurs, 06 Dec 2007 11:44:00 GMT |
- yes, of course i used your excellent samples ... :-)
- no, i dont use an individual installer - just the normal .msi which is created by vs2003
- no, i have no hardcoded path in the application
anyway - now it works again and i will never move this project away from C:
(except for saving)
sigik | Thurs, 06 Dec 2007 11:45:00 GMT |