I finally found the information I was looking for at: VSTO
First of all I set those 2 lines:
using Excel = Microsoft.Office.Interop.Excel;
using Office = Microsoft.Office.Tools.Excel;
As a second step I check if the workbook is not null, then if the worksheet is not null. If this is the case, set the footer to the document. It is not pretty, but I can refine it tommorow at the office.
Excel.Workbook Workbook = Globals.ThisAddIn.Application.ActiveWorkbook;
if (Workbook != null)
{
Office.Workbook vstoWorkbook = Globals.Factory.GetVstoObject(Workbook);
Excel.Worksheet worksheet = Globals.ThisAddIn.Application.ActiveSheet;
if (worksheet != null)
{
Office.Worksheet vstoSheet = Globals.Factory.GetVstoObject(worksheet);
vstoSheet.PageSetup.CenterFooter = "testing the footer";
}
}