Discussion:
Exception when adding a toolbar as a word-addin
(too old to reply)
Matthias Langbein
2005-10-24 17:02:21 UTC
Permalink
Hi all,

I tried to build a MSDN-Tip how to integrates a word-toolbar in a
addin:
(http://support.microsoft.com/Default.aspx?kbid=302901#XSLTH3228121124120121120120)

The class member applicationObject was initialized with the
word-application-objekt. When calling


Microsoft.Office.Core.Commandbar toolbar = null;
try
{
toolbar = (Microsoft.Office.Core.CommandBar)_
applicationObject.CommandBars.Add("My Toolbar",_
Microsoft.Office.Core.MsoBarPosition.msoBarFloating,_
System.Reflection.Missing.Value, true);
}
catch (Exception ee)
{
.....
}


I recieve the exception:
"Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt."
which means pretty much:
"The bject link was not assigned with a object instance."

How comes? I'm desparate...
THX for all the help, yours Langi
Bob Butler
2005-10-24 17:09:10 UTC
Permalink
Post by Matthias Langbein
Hi all,
I tried to build a MSDN-Tip how to integrates a word-toolbar in a
(http://support.microsoft.com/Default.aspx?kbid=302901#XSLTH3228121124120121
120120)
Post by Matthias Langbein
The class member applicationObject was initialized with the
word-application-objekt. When calling
Microsoft.Office.Core.Commandbar toolbar = null;
try
{
toolbar = (Microsoft.Office.Core.CommandBar)_
applicationObject.CommandBars.Add("My Toolbar",_
Microsoft.Office.Core.MsoBarPosition.msoBarFloating,_
System.Reflection.Missing.Value, true);
}
catch (Exception ee)
{
.....
}
"Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt."
"The bject link was not assigned with a object instance."
How comes? I'm desparate...
THX for all the help, yours Langi
You are writing an add-in using C# and posted the question to a COM group
and 2 VB groups?

Try searching for newsgroups containing .dotnet. in the name.
--
Reply to the group so all can participate
VB.Net: "Fool me once..."
Jamie Ayer
2005-10-24 17:29:27 UTC
Permalink
On his behalf, writing an office plug in with C# is creating a COM addin...
Post by Matthias Langbein
Post by Matthias Langbein
Hi all,
I tried to build a MSDN-Tip how to integrates a word-toolbar in a
(http://support.microsoft.com/Default.aspx?kbid=302901#XSLTH3228121124120121
120120)
Post by Matthias Langbein
The class member applicationObject was initialized with the
word-application-objekt. When calling
Microsoft.Office.Core.Commandbar toolbar = null;
try
{
toolbar = (Microsoft.Office.Core.CommandBar)_
applicationObject.CommandBars.Add("My Toolbar",_
Microsoft.Office.Core.MsoBarPosition.msoBarFloating,_
System.Reflection.Missing.Value, true);
}
catch (Exception ee)
{
.....
}
"Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt."
"The bject link was not assigned with a object instance."
How comes? I'm desparate...
THX for all the help, yours Langi
You are writing an add-in using C# and posted the question to a COM group
and 2 VB groups?
Try searching for newsgroups containing .dotnet. in the name.
--
Reply to the group so all can participate
VB.Net: "Fool me once..."
Bob Butler
2005-10-24 19:16:57 UTC
Permalink
Post by Jamie Ayer
On his behalf, writing an office plug in with C# is creating a COM addin...
I considered that but any issues are still more likely to be C#/dotnet
related than direclty COM related. BTW, changing the subject is not usually
a good idea because it causes some newsreaders to see it as a new thread.
--
Reply to the group so all can participate
VB.Net: "Fool me once..."
Matthias Langbein
2005-10-24 18:11:21 UTC
Permalink
Sorry!!! I clicked reply on a formerly stored message to find a
apropriate group, but forgot to check the other groups in the header.
My mistake, sorry again...

On Mon, 24 Oct 2005 10:09:10 -0700, "Bob Butler"
Post by Matthias Langbein
Post by Matthias Langbein
Hi all,
I tried to build a MSDN-Tip how to integrates a word-toolbar in a
(http://support.microsoft.com/Default.aspx?kbid=302901#XSLTH3228121124120121
120120)
Post by Matthias Langbein
The class member applicationObject was initialized with the
word-application-objekt. When calling
Microsoft.Office.Core.Commandbar toolbar = null;
try
{
toolbar = (Microsoft.Office.Core.CommandBar)_
applicationObject.CommandBars.Add("My Toolbar",_
Microsoft.Office.Core.MsoBarPosition.msoBarFloating,_
System.Reflection.Missing.Value, true);
}
catch (Exception ee)
{
.....
}
"Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt."
"The bject link was not assigned with a object instance."
How comes? I'm desparate...
THX for all the help, yours Langi
You are writing an add-in using C# and posted the question to a COM group
and 2 VB groups?
Try searching for newsgroups containing .dotnet. in the name.
Alex
2005-10-24 18:54:26 UTC
Permalink
Post by Matthias Langbein
(http://support.microsoft.com/Default.aspx?kbid=302901#XSLTH3228121124120121120120)
The class member applicationObject was initialized with the word-application-objekt. When calling
Microsoft.Office.Core.Commandbar toolbar = null;
try
{
toolbar = (Microsoft.Office.Core.CommandBar)_
applicationObject.CommandBars.Add("My Toolbar",_
Microsoft.Office.Core.MsoBarPosition.msoBarFloating,_
System.Reflection.Missing.Value, true);
}
catch (Exception ee)
{
.....
}
"Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt."
"The bject link was not assigned with a object instance."
You are writing an add-in using C# and posted the question to a COM group and 2 VB groups?
Try searching for newsgroups containing .dotnet. in the name.
microsoft.public.office.developer.com.add_ins is the correct group.
Followup-To set accordingly.
Loading...