Create PUB addin with VB2005

Z

Zack Barresse

Hello everyone,

I received Visual Studio 2005 (with .NET framework) as a gift recently (been
drooling over it). I am trying to make a Publisher addin with it as I'm
trying to make a commandbar populate to the toolbar on open. I am working
with Publisher 2003. I know it now has a Document_Open procedure, but
doesn't work for me as it's only a SDI (Single Document Interface), and I
want this available for all documents at anytime in any instance. So my
line of thinking was, make an addin.

I have the code I want to make the toolbar, that is not an issue at all.
But getting it into an addin for Publisher is quite another task.

I thought I could reference the (COM) Object Library, but there isn't one
for Publisher, just Office 11.0. This makes it quite difficult for me to
understand how to access the Publisher Object Library. I did read Ed
Bennett's tutorial on creating publisher addins with VB6, but it's not quite
the same (seen here http://www.mvps.org/the_nerd/Publisher/tutaddin.htm ).

Any help would be greatly appreciated. If this is the wrong forum, perhaps
a pointing in the right direction would help. Thanks very much for your
time.
 
E

Ed Bennett

Zack Barresse said:
I have the code I want to make the toolbar, that is not an issue at
all. But getting it into an addin for Publisher is quite another task.

Did you install Publisher before or after installing VS2005?

If before, you may need to reinstall Publisher, using a Custom installation,
to make sure that you have the Primary Interop Assemblies (PIAs) for
Publisher 2003 installed.

If after, they should have been installed automatically.

I haven't developed a Publisher add-in with VS2005 yet, so the advice I'm
giving is what worked with VS.NET2003 (should work with VS2005 as well).

You need to add a reference in your project to the Publisher 11.0 Object
Library (as a COM component); this will actually point to the Publisher PIA
in the Global Assembly Cache (unless the PIAs aren't installed, in which
case VS will build one, which won't work).

You also need to alter the macro security in Publisher to "Trust all
installed templates and add-ins", otherwise your code will not run.
 
Z

Zack Barresse

Ah, so The PIA is the issue I have to deal with. I actually just
reinstalled it yesterday (Publisher) again, choosing Complete Install. I'll
check for that (as I haven't gotten back to it after the install) and make
sure it's there.

Thanks very much Ed, much appreciated. Will let you know if it worked or
not.

Take care,
Zack Barresse
 
Z

Zack Barresse

I finally got VB6 and created the addin just fine. Thanks for all your
help. :)
 

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