Create command buttons in OnStartupComplete?

N

Nick Hebb

I want to speed up the loading time of my add-in to reduce the chances
of winding up in the Disabled Items list. I've been playing around
with the code today. I created the command bar in the OnConnection
event like I normally would, but this time with only one button (a
caption button). Then, I load up the remaining controls in the
OnStartupCompete event.

It appears to work great, but before I roll it out I was wondering if
anyone knew of any pitfalls with this approach?


Thanks in advance,

Nicholas Hebb
BreezeTree Software
http://www.breezetree.com
 
K

Ken Slovak - [MVP - Outlook]

You'll only have 1 button if the use enables your addin using the COM
Add-Ins dialog. OnStartupComplete doesn't fire in that case.
 
N

Nick Hebb

That's a good point, Ken.

Since my add-in gets registered for all users, it doesn't get listed
in the COM Add-ins dialog. So that wouldn't affect my product, but it
definitely wouldn't be a good idea for COM add-ins that get registered
only to the current user.
 
L

Lars

Hello,
You'll only have 1 button if the use enables your addin using the COM
Add-Ins dialog. OnStartupComplete doesn't fire in that case.

How does this differ, if the Add-In is also registered as an
automation add-in in Excel ?

I am trying to build an add-in that needs to be configured using a
menu item, but the menu item does not show up until a formula provided
by the add-in is typed into a cell. The menu item is created in the
OnStartupComplete method.

Lars
 
K

Ken Slovak - [MVP - Outlook]

I have no idea about the Excel niceties with that. I'd suggest starting a
new thread explicitly mentioning Excel instead of hijacking an Outlook addin
thread.
 
N

Nick Hebb

I have no idea about the Excel niceties with that. I'd suggest starting a
new thread explicitly mentioning Excel instead of hijacking an Outlook addin
thread.

With all due respect, Ken, this is an Excel thread since my product is
an Excel add-in.

Lars, I don't really understand your startup procedure. It seems the
order of events is reversed.
 
K

Ken Slovak - [MVP - Outlook]

It may discuss Excel but it's in an Outlook group, where you won't find the
kind of Excel expertise that you'll find in an Excel group.
 
N

Nick Hebb

It may discuss Excel but it's in an Outlook group, where you won't find the
kind of Excel expertise that you'll find in an Excel group.

microsoft.public.office.developer.com.add_ins is an Outlook group? I
seriously didn't know that. There's nothing in the group name to
indicate that.

Nicholas Hebb
BreezeTree Software
http://www.breezetree.com
 
K

Ken Slovak - [MVP - Outlook]

Sorry, my mistake, I thought we were in an Outlook group. I apologize, I get
confused some time with all the groups I'm in.

I still say a new thread with Excel in the title would be best. A lot of the
regulars don't review threads that seem to be out of their expertise and
therefore won't catch the Excel question in the thread.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top