Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Publisher / Programming / February 2006

Tip: Looking for answers? Try searching our database.

Create PUB addin with VB2005

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Zack Barresse - 16 Jan 2006 19:25 GMT
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.

Signature

Regards,
Zack Barresse, aka firefytr, (GT = TFS FF Zack)
To email, remove the NO SPAM.  Please keep correspondence to the board, as
to benefit others.

Ed Bennett - 17 Jan 2006 13:17 GMT
> 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.

Signature

Ed Bennett - MVP Microsoft Publisher

Zack Barresse - 18 Jan 2006 16:32 GMT
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

>> 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.
[quoted text clipped - 19 lines]
> You also need to alter the macro security in Publisher to "Trust all
> installed templates and add-ins", otherwise your code will not run.
Zack Barresse - 08 Feb 2006 20:28 GMT
I finally got VB6 and created the addin just fine.  Thanks for all your
help.  :)

Signature

Regards,
Zack Barresse, aka firefytr, (GT = TFS FF Zack)
To email, remove the NO SPAM.  Please keep correspondence to the board, as
to benefit others.

>> 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.
[quoted text clipped - 19 lines]
> You also need to alter the macro security in Publisher to "Trust all
> installed templates and add-ins", otherwise your code will not run.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.