Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / VS Tools for Office / June 2006

Tip: Looking for answers? Try searching our database.

VSTO 2005 Outlook Add-in Custom Toolbar

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Larry Marshall - 06 Jun 2006 23:15 GMT
I'm new to the VSTO and trying to add a custom toolbar to all new email
messages.  I've successfully run the sample code at

http://msdn2.microsoft.com/en-us/library/ms268864(VS.80).aspx

that adds custom toolbars to Outlook.Explorer.  From my limited research,
I've tried modifying the code to add the toolbar to Outlook.Inspector
instead.  I modified the line

Office.CommandBars cmdBars =
           this.ActiveExplorer().CommandBars;

to read

Office.CommandBars cmdBars =
           this.ActiveInspector().CommandBars;

The add-in fails on this line with the error message: "Object reference not
set to an instance of an object."

Any suggestions or samples of adding a custom toolbar to an email and not
the main Outlook (2003) window?
Thaddaeus Parker - 29 Jun 2006 01:41 GMT
If there is no open inspector you will receive that error because there no
inspectors when Outlook first starts.  What you need to do is to capture the
OnNewInspector event and then check to see whether the inspector's current
item is what you are looking for and then during the open event of the item
you grab the inspector's commandbars and add your own.  Check The VSTO
section of http://www.outlookcode.com/vsto/index.htm.  Helmutt Olbertanner
http://www.x4u.de/Outlook/tabid/54/Default.aspx  has some good tips and
tricks on Outlook addin development with VSTO and C# in general.

Regards,

Thaddaeus.
> I'm new to the VSTO and trying to add a custom toolbar to all new email
> messages.  I've successfully run the sample code at
[quoted text clipped - 18 lines]
> Any suggestions or samples of adding a custom toolbar to an email and not
> the main Outlook (2003) window?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
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.