When i run
private void Print_Click(object sender, EventArgs e)
{
var application = new Microsoft.Office.Interop.Word.Application();
var document = new Microsoft.Office.Interop.Word.Document();
document = application.Documents.Add(Template: @"C:\Office\Word\Templates\AttNoteEN.dotm");
application.Visible = true;
}
i get the below message. i have the reference in for the office interop but i still get this message.
System.Runtime.InteropServices.COMException: 'Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).'
User contributions licensed under CC BY-SA 3.0