Word 2003 COM AddIn deployment problems

M

myles

Hi there,

We have developed a Word 2003 AddIn in Delphi for WIN32 that works
great. However we are finding that in about 30% of installations, the
toolbar that we create in our AddIn is not showing up for users, or is
showing up but without any buttons on it. Its really strange as we
are having a huge problem trying to duplicate this behavior as it
works perfectly well on all of our development machines.

The symptoms appear to be as follows:

On a computer that is exhibiting this problem:

1. Reboot the computer and start fresh
2. Install the AddIn and register to the computer
3. Start Word 2003
4. AddIn starts fine and toolbar is displayed but not yet docked
5. File-> Exit Word
6. Restart Word again. This time no toolbar is showing up. If I go
to Tools->Customize the toolbar is listed there, but unchecked. If I
check it then it displays a toolbar but without any buttons on it

It appears that Word is having problems loading the AddIn on
subsequent restarts, but not after it is first installed.

Is there any specific things I should be checking in registries, etc.
or anyway to get Word to tell me any errors that its getting when it
attempts to load the AddIn and something goes wrong?

Any pointers would be greatly appreciated.

Thanks
Myles
 
S

SvenC

Hi
We have developed a Word 2003 AddIn in Delphi for WIN32 that works
great. However we are finding that in about 30% of installations, the
toolbar that we create in our AddIn is not showing up for users, or is
showing up but without any buttons on it.

On a computer that is exhibiting this problem:

1. Reboot the computer and start fresh
2. Install the AddIn and register to the computer
3. Start Word 2003
4. AddIn starts fine and toolbar is displayed but not yet docked
5. File-> Exit Word
6. Restart Word again. This time no toolbar is showing up. If I go
to Tools->Customize the toolbar is listed there, but unchecked. If I
check it then it displays a toolbar but without any buttons on it

It appears that Word is having problems loading the AddIn on
subsequent restarts, but not after it is first installed.

How and in which event do you create the toolbar?
 
M

Myles

How and in which event do you create the toolbar?

I am using a development framework from Add In Express (www.add-in-
express.com) that does this. They may be masking the events that fire
to create the toolbar but typically they come up right after Word
loads. Does that help at all?

Myles
 
S

SvenC

Hi,
I am using a development framework from Add In Express (www.add-in-
express.com) that does this. They may be masking the events that fire
to create the toolbar but typically they come up right after Word
loads. Does that help at all?

Maybe you should ask their support if they have some.

Can you show the code how you create the command bar and the buttons?
 
H

Hein

Hi, I have exactly the same problem. I reported it to the support of adxexpress. There is no difference if you create the bar dynamicly or static (using a component). If you make the bar visible on the Startup complete event it will show the caption but it refuges to show the bitmap.

I have used the follwing code:

procedure TAddInModule.adxWordDocumentModuleAddInInitialize(
Sender: TObject);
begin
showmessage('init');
CBar1:=TadxCommandBar.Create(self);
CBar1.Name:='Bar';
cBar1.Position:=adxMsoBarFloating;
cBar1.SupportedApps:=[ohaWord];
CBar1.Visible:=true;

// Button
Control := CBar1.Controls.Add(adxButton, 'ADX2_RT_TAG1', 0, False);
Control.Tag := 10;
ImageList1.GetBitmap(0, Control.AsButton.Glyph);
Control.AsButton.Caption := 'Button 1';
Control.AsButton.Style := adxMsoButtonIconAndCaption;
CBar1.Visible:=true;
//Control.AsButton.OnClick := DoClick;
end;

procedure TAddInModule.adxWordDocumentModuleAddInStartupComplete(
Sender: TObject);
begin
showmessage('complete');

//I have tried this, but no better results <--------------------
//Caption shows but no bitmap appears

//adxCommandBar1.Controls[0].Visible:=true;
//dxCommandBar1.Visible:=true;
//adxCommandBar1.Controls[0].Visible:=true;

end;

procedure TAddInModule.adxWordDocumentModuleAddInFinalize(Sender: TObject);
begin
FreeAndNil(CBar1);
end;

initialization
TadxFactory.Create(ComServer, TcoHMWord, CLASS_coHMWord, TAddInModule);

end.
 
S

SvenC

Hi,
Hi, I have exactly the same problem. I reported it to the support of
adxexpress. There is no difference if you create the bar dynamicly or
static (using a component). If you make the bar visible on the
Startup complete event it will show the caption but it refuges to
show the bitmap.

Can you customize the toolbar manually and change the style of the button to
Standard which should display the image only?

With the Office command bar buttons there is a style property for buttons
which you can set to msoButtonIcon. May adexpress wraps that property
somehow, so that you can set it?
 
H

Hein

I have overcome the problem by deleting another COM-addin (Omnipage). Suggestion form ADX support.
 
M

Myles

I have overcome the problem by deleting another COM-addin (Omnipage). Suggestion form ADX support.

I also was finally able to overcome this problem. For me the issue is
the 'Temporary' property. If the command bar is created and NOT set
to Temporary (default behavior), ADX will store its UI settings in
NORMAL.DOT. You can't easily change the Custom Container for this as
if you do, on opening a 2nd Word document will create duplicate
toolbars in the original one. ADX specifically state not to do this,
but I found that if I use the Temporary property, it forces the
toolbar to be redrawn from scratch each time the Toolbar
instantiates. This is a little slower, although not unbearable. But
it works perfectly if set this way.

Hope that helps.
Myles
 

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