So bassicly im using an OfficeLine which is running on Access and my programms are list like that:
and now I want one of them open from C#.
I tried to use Interop.Access for that because my C# programm is an Class Library program.
And then to get all Forms from Access because in my Task manager my Officline is looking like that:
and I get the Form with that Code:
foreach (Form form in accessApp.Forms)
{
try
{
// Überprüfen, ob Formular geöffnet ist
if (!accessApp.Forms[form.Name].CurrentView.Equals(AcFormView.acDesign))
{
//MessageBox.Show("Das ist der if Block: " + form.Name);
if (form.Name == "frmSysControlCenter")
{
foreach (Microsoft.Office.Interop.Access.Control control in form.Controls)
{
}
}
}
else
{
MessageBox.Show("Das ist der else Block: " + form.Name);
}
}
catch
{
// Falls ein Fehler auftritt, das Formular ist nicht geöffnet
}
}
and frmSysControlCenter should be the Form but now I dont know how to access the formulars from my OfficeLine I thought on something like looking through Controls but that didnt work.
So anyone an Idea how to open an Formular like Stammdaten -> Artikel for example from my first screenshot?