Hullo Good Friends,
I need your help. Please help me.
I am using C#NET2008 to develop Window application
I am trying to retrieve Sales Transaction and print it on WORD Document as statement of account.
this coding created error message listed below:
objWord = new Microsoft.Offic e.Interop.Word. Words();
Error message:
Error 1 Cannot create an instance of the abstract class or interface 'Microsoft.Offi ce.Interop.Word .Words'
I need your help. Please help me.
I am using C#NET2008 to develop Window application
I am trying to retrieve Sales Transaction and print it on WORD Document as statement of account.
this coding created error message listed below:
objWord = new Microsoft.Offic e.Interop.Word. Words();
Error message:
Error 1 Cannot create an instance of the abstract class or interface 'Microsoft.Offi ce.Interop.Word .Words'
Code:
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 "
objWord = new Microsoft.Office.Interop.Word.Words(); <- Error
objDoc = new Microsoft.Office.Interop.Word.Document();
}
}
}
Comment