Hey guys, Im gettin an exception when i run this code. This code is taken from a VB code which is basically to create an add-in in visio using c# - private void ThisAddIn_Startup(object sender, System.EventArgs e)
-
{
-
Microsoft.Office.Core.CommandBars commandBars;
-
Microsoft.Office.Core.CommandBar commandBar;
-
-
commandBars =(Microsoft.Office.Core.CommandBars)Application.CommandBars;
-
commandBar = commandBars.Add("Demo Toolbar",Office.MsoBarPosition.msoBarTop,"",true);
-
//set the context menu when the toolbar is visible.
-
commandBar.Context = Visio.VisUIObjSets.visUIObjSetDrawing + "*";
-
-
//add a button wth a smiley face icon
-
-
Microsoft.Office.Core.CommandBarButton DemoButton = (Microsoft.Office.Core.CommandBarButton)commandBar.Controls.Add(Microsoft.Office.Core.MsoControlType.msoControlButton,2950,"","","");
-
DemoButton.Tag = "Demo Button";
-
DemoButton.FaceId = 2950;
-
DemoButton.TooltipText= "Run Demo";
-
-
-
-
}
1 1525
Please post the exception. Thanks.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Lucvdv |
last post by:
Can someone explain why this code pops up a messagebox saying the
ThreadAbortException wasn't handled?
The first exception is reported only in the debug pane, as expected.
The second (caused by...
|
by: Samuel R. Neff |
last post by:
When you have an unhandled exception in vb.net how do you view the
exception information in the debugger?
In C# the debugger creates a local variable that points to the
exception and you can...
|
by: John |
last post by:
Hi there,
I'm fairly new to VB.Net (and VB generally) so please bear with me if these
are stupid questions!
I'm trying run a procedure on multiple Visio files from a form created in VS
2003. ...
|
by: Colmeister |
last post by:
I recently read Jason Clark's excellent article on Unhandled Exceptions
(http://msdn.microsoft.com/msdnmag/issues/04/06/NET/default.aspx) and have
attempted to incorporate the features he talks...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |