Microsoft Office Miscellaneous: VS 2003: Outlook AddIn - seems not to load ...

  • sigik / 104 / Tues, 09 Mar 2010 14:22:00 GMT / Comments (6)
  • i have an outlook addin, which worked properly for 5 months.
    now, when i click the button, nothing happens.
    i removed and re-installed the addin, the registry-key seems to be ok

    http://img216.imageshack.us/img216/2234/clipboard01vr7.jpg

    but nothing happens, when i run outlook - no button, no action ...

    on an different pc - the addin works fine ... - BUT: both run XP prof.SP2, both run Office 2003 SP2 - only difference: VS2003 is only on the one machine, where the addin works fine ...

    anyone any idea ? THANKS !!!
  • Keywords:

    2003, outlook, addin, seems, load, microsoft, office

  • http://www.edevs.com/microsoft-office/56223/«« Last Thread - Next Thread »»
    1. no one any idea ? :cry:

      sigik | Thurs, 06 Dec 2007 11:39:56 GMT |

    2. What does your addin do? Does it show up in the disabled items list?

      robdog888 | Thurs, 06 Dec 2007 11:40:56 GMT |

    3. 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 |

    4. 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 |

    5. 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 |

    6. - 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 |

  • Microsoft Office Miscellaneous Questions

    • Property vs Function in Class Module

      In a User-Defined Class:For "derived" properties, rather than base properties, is there any differen...

      By dkenny, 1 Comments

    • Time Conversion

      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

    • Activating Applications

      How do I reliably switch between Office applications using code? I have an excel workbook that when...

      By mpselby, 3 Comments

    • Excel security

      Is it possible to force Excel to close if Macros aren't enabled after opening some file?...

      By fonty, 1 Comments

    • ScrollBar in Excel problem

      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

    • Simple Outlook + VB question - run-time error

      Hello,I'm very inexperienced to VB programming, actually merely using some code I was given by ...

      By sundboell, 1 Comments

    • activeX controls loose position

      Hello,Im developing an Excel application using ActiveX controls (Checkboxes, Optionbuttons, Textfiel...

      By m_haitz, 5 Comments

    • to add rows to a table...

      hi alli want to add new rows ...but when i use the codeIf Selection.Information(wdWithInTable) = Tru...

      By kmsantosh, 5 Comments