PC Review


Reply
Thread Tools Rate Thread

The case of OnStartupComplete

 
 
ivan.pololi@gmail.com
Guest
Posts: n/a
 
      14th Jan 2009
Hello,

I'm still struggling with my outlook addin.

I'm developing an add-in for multiple versions of Outlook.

It is build with VB.NET, using the Shared-Add-in project. I created it
using Microsoft Outlook 10.0 Object Library (Outlook 2002 aka 'Outlook
XP')

The OnConnection Event works fine.

The OnStartupComplete event works fine on Outlook XP but on Outlook
2007 it has this problem...if I include the line with the
ActiveExplorer variable the event never fires! :-(

What it can be?

Here is the portion of code:

Private _applicationObject As Object
Private _addInInstance As Object
Private _outApp As Outlook.Application
Private WithEvents _activeExplorerBars As
Microsoft.Office.Core.CommandBars

Public Sub OnStartupComplete(ByRef custom As System.Array) Implements
Extensibility.IDTExtensibility2.OnStartupComplete
Log("OnStartupComplete.Begin")
_outApp = DirectCast(_applicationObject, Outlook.Application)
Log("AppDetails." & _outApp.Name & " " & _outApp.ProductCode)
'_activeExplorerBars = _outApp.ActiveExplorer.CommandBars

_activeExplorerBars = Nothing 'REMOVING THIS LINE OF CODE
MAKES OnStartUpComplete To FIRE!


Log("OnStartupComplete.End")
End Sub
 
Reply With Quote
 
 
 
 
ivan.pololi@gmail.com
Guest
Posts: n/a
 
      14th Jan 2009
I found the problem!

By default the file Interop.Microsoft.Office.Core.dll was not included
in the release!

Once included it works fine.

On 14 Gen, 11:42, ivan.pol...@gmail.com wrote:
> Hello,
>
> I'm still struggling with my outlook addin.
>
> I'm developing an add-in for multiple versions of Outlook.
>
> It is build with VB.NET, using the Shared-Add-in project. I created it
> using Microsoft Outlook 10.0 Object Library (Outlook 2002 aka 'Outlook
> XP')
>
> The OnConnection Event works fine.
>
> The OnStartupComplete event works fine on Outlook XP but on Outlook
> 2007 it has this problem...if I include the line with the
> ActiveExplorer variable the event never fires! :-(
>
> What it can be?
>
> Here is the portion of code:
>
> *Private _applicationObject As Object
> *Private _addInInstance As Object
> *Private _outApp As Outlook.Application
> *Private WithEvents _activeExplorerBars As
> Microsoft.Office.Core.CommandBars
>
> *Public Sub OnStartupComplete(ByRef custom As System.Array) Implements
> Extensibility.IDTExtensibility2.OnStartupComplete
> * * * * Log("OnStartupComplete.Begin")
> * * * * _outApp = DirectCast(_applicationObject, Outlook.Application)
> * * * * Log("AppDetails." & _outApp.Name & " " & _outApp.ProductCode)
> * * * * '_activeExplorerBars = _outApp.ActiveExplorer.CommandBars
>
> * * * * _activeExplorerBars = Nothing 'REMOVING THIS LINE OF CODE
> MAKES OnStartUpComplete To FIRE!
>
> * * * * Log("OnStartupComplete.End")
> * * End Sub


 
Reply With Quote
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      14th Jan 2009
You aren't deploying that are you? You should only be deploying your own
components, if the PIA's for Office/Outlook are needed they should be
installed from the redistributable packages from MS.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


<(E-Mail Removed)> wrote in message
news:d91211de-f952-495a-b3f0-(E-Mail Removed)...
I found the problem!

By default the file Interop.Microsoft.Office.Core.dll was not included
in the release!

Once included it works fine.

On 14 Gen, 11:42, ivan.pol...@gmail.com wrote:
> Hello,
>
> I'm still struggling with my outlook addin.
>
> I'm developing an add-in for multiple versions of Outlook.
>
> It is build with VB.NET, using the Shared-Add-in project. I created it
> using Microsoft Outlook 10.0 Object Library (Outlook 2002 aka 'Outlook
> XP')
>
> The OnConnection Event works fine.
>
> The OnStartupComplete event works fine on Outlook XP but on Outlook
> 2007 it has this problem...if I include the line with the
> ActiveExplorer variable the event never fires! :-(
>
> What it can be?
>
> Here is the portion of code:
>
> Private _applicationObject As Object
> Private _addInInstance As Object
> Private _outApp As Outlook.Application
> Private WithEvents _activeExplorerBars As
> Microsoft.Office.Core.CommandBars
>
> Public Sub OnStartupComplete(ByRef custom As System.Array) Implements
> Extensibility.IDTExtensibility2.OnStartupComplete
> Log("OnStartupComplete.Begin")
> _outApp = DirectCast(_applicationObject, Outlook.Application)
> Log("AppDetails." & _outApp.Name & " " & _outApp.ProductCode)
> '_activeExplorerBars = _outApp.ActiveExplorer.CommandBars
>
> _activeExplorerBars = Nothing 'REMOVING THIS LINE OF CODE
> MAKES OnStartUpComplete To FIRE!
>
> Log("OnStartupComplete.End")
> End Sub


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't find short cut for changing case ... upper case .... lower case JERRY Microsoft Word New Users 7 23rd Aug 2007 05:29 PM
OnStartupComplete() =?Utf-8?B?WWFlbA==?= Microsoft Outlook Program Addins 0 29th May 2007 12:37 PM
OnStartupComplete and activeworkbook mike dilworth Microsoft Excel Programming 2 30th Jul 2005 02:33 PM
Why OnStartupComplete is not called. Vladimir Chtchetkine Microsoft Outlook Program Addins 1 24th Jan 2005 03:11 PM
OnStartupComplete never fires for Csharp Outlook Add-in Irregular Microsoft Outlook Program Addins 2 15th Dec 2003 09:34 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:30 AM.