This project has moved and is read-only. For the latest updates, please go here.
1
Vote

Class not found in loaded NetOffice Assemblies

description

Applied to Microsoft Access.
I received similar exception when use property Parent for any control if Parent is Form.
You could see one of them in example (button0 on Form1 )

NetOffice.NetOfficeException: Class 49b38fa1-b771-41e1-a8d6-8e65b81fcf97:Form_Form1 not found in loaded NetOffice Assemblies

file attachments

comments

SebastianDotNet wrote Oct 14, 2016 at 8:21 AM

Have you tried to add a reference to MSFormsApi.dll ?

Sebastian

Serge1956 wrote Oct 14, 2016 at 9:56 AM

I tried, but it did not help.
Which connection can be between Access.Form and MSForms?

Serge

SebastianDotNet wrote Oct 14, 2016 at 12:53 PM

MSFormsApi is the "Forms 2.0" COM library which contains TextBox, Button, Label, etc.
You need this libray if you want to access controls like these in office applications.

I can not open the database right now with my access 2007. can you see whats the class name of the parent interop proxy?

Sebastian

Serge1956 wrote Oct 15, 2016 at 8:00 AM

MSFormsApi is the "Forms 2.0" COM library which contains TextBox, Button, Label, etc.
I know about MSForms.
Access.Form and MSForm.Userform are two different objects.
Also Access.CommandButton and MSForm.CommandButton etc.
I can not open the database right now with my access 2007.
You can create own database file with one form (Form1) wich contains one CommandButton

Serge

SebastianDotNet wrote Oct 17, 2016 at 8:25 PM

Yes i know, it was just an idea.

I have to ask on more time because this is the most important question.
What type is this interop proxy with the interface id 49b38fa1-b771-41e1-a8d6-8e65b81fcf97 ?
what its type or (class) name? (your see that in your alternate interop solution)
You can see that in the debugger or recieve informations with:
System.ComponentModel.TypeDescriptor.GetClassName(object instance);


*Sebastian

Serge1956 wrote Oct 20, 2016 at 11:52 AM

Sebastian,

System.ComponentModel.TypeDescriptor.GetClassName(ctl.Parent) return Form_Form1.
This is evident in the first message.

Guid changes with each opening of the Access Application, but the same for different foms:

NetOffice.NetOfficeException: Class f47e1d09-6f8c-46c1-8952-c26dfb5d4e5d:Form_Form1 not found in loaded NetOffice Assemblies

NetOffice.NetOfficeException: Class f47e1d09-6f8c-46c1-8952-c26dfb5d4e5d:Form_Form2 not found in loaded NetOffice Assemblies

Serge