F
Frenchy
Hi all,
I developed an add-in in C# VS 2003 (extensibility project) for Word 2003.
I have a big bug that I really can't understand;
I've created a commandbar with one combobox and one button.
I tried to do exactly the same things in the Events Combo changed and Button
Clicked. (I did this just for test).
When I click the button everything goes fine, but when I select something in
the comboBox I have this error;
__________
System.Runtime.InteropServices.COMException (0x800A11FD): This command is
not available.
at Word.View.set_SeekView(WdSeekView prop)
at Addin1.Connect.AddWatermark(String WatermarkText) in
c:\dvp\c#\vs2003\addinok\connect.cs:line 930
___________
And here's the line where is the error :
this.appWord.ActiveWindow.ActivePane.View.SeekView =
Word.WdSeekView.wdSeekCurrentPageHeader;
So I don't understand why I can access the header/footer from a button click
and not from a combobox...GRRRRRRRRRRRRRRRRRRRRRRR
I have to add one thing: I have this problem since I protect the Section 1
of my document. But in the beginning of my code I Unprotect It (and It works
when I click the button)...I'm sure nobody will find the solution and I'm
becoming CRAZY AAARGGGgg
I developed an add-in in C# VS 2003 (extensibility project) for Word 2003.
I have a big bug that I really can't understand;
I've created a commandbar with one combobox and one button.
I tried to do exactly the same things in the Events Combo changed and Button
Clicked. (I did this just for test).
When I click the button everything goes fine, but when I select something in
the comboBox I have this error;
__________
System.Runtime.InteropServices.COMException (0x800A11FD): This command is
not available.
at Word.View.set_SeekView(WdSeekView prop)
at Addin1.Connect.AddWatermark(String WatermarkText) in
c:\dvp\c#\vs2003\addinok\connect.cs:line 930
___________
And here's the line where is the error :
this.appWord.ActiveWindow.ActivePane.View.SeekView =
Word.WdSeekView.wdSeekCurrentPageHeader;
So I don't understand why I can access the header/footer from a button click
and not from a combobox...GRRRRRRRRRRRRRRRRRRRRRRR
I have to add one thing: I have this problem since I protect the Section 1
of my document. But in the beginning of my code I Unprotect It (and It works
when I click the button)...I'm sure nobody will find the solution and I'm
becoming CRAZY AAARGGGgg