objWord = new Microsoft.Office.Interop.Word.Words(); <--- Error
Error Message: Error 1 Cannot create an instance of the abstract class or interface 'Microsoft.Office.Interop.Word.Words' Here are the coding: using Microsoft.Office.Core;using Microsoft.Office;using Microsoft.Office.Interop.Word; namespace CSharpDelegatePractice{ public partial class FrmCustomerMaint : Form { private Microsoft.Office.Interop.Word.Words objWord; private Microsoft.Office.Interop.Word.Document objDoc; private void WordToolStripMenuItem_Click(object sender, EventArgs e) { string strsql = "Select * from TblSales where SalesID = " + txtSalesID objWord = new Microsoft.Office.Interop.Word.Words(); <--- Error objDoc = new Microsoft.Office.Interop.Word.Document(); } }} Please help me. Thank You. Cheers, Lennie
Error 1 Cannot create an instance of the abstract class or interface 'Microsoft.Office.Interop.Word.Words'
Here are the coding:
using Microsoft.Office.Core;using Microsoft.Office;using Microsoft.Office.Interop.Word; namespace CSharpDelegatePractice{ public partial class FrmCustomerMaint : Form { private Microsoft.Office.Interop.Word.Words objWord; private Microsoft.Office.Interop.Word.Document objDoc; private void WordToolStripMenuItem_Click(object sender, EventArgs e) { string strsql = "Select * from TblSales where SalesID = " + txtSalesID objWord = new Microsoft.Office.Interop.Word.Words(); <--- Error objDoc = new Microsoft.Office.Interop.Word.Document(); } }}
using Microsoft.Office.Core;
using Microsoft.Office;
using Microsoft.Office.Interop.Word;
namespace CSharpDelegatePractice
{
public partial class FrmCustomerMaint : Form
private Microsoft.Office.Interop.Word.Words objWord;
private Microsoft.Office.Interop.Word.Document objDoc;
private void WordToolStripMenuItem_Click(object sender, EventArgs e)
string strsql = "Select * from TblSales where SalesID = " + txtSalesID
objDoc = new Microsoft.Office.Interop.Word.Document();
}