TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Lennie Kuah
NA
27
0
C#NET2008 Window Application using Microsoft WORD 2003
Aug 25 2011 7:49 PM
Hullo Good Friends,
I do need your help. Please help me.
I am encountering a very puzzling problems using Microsoft Office WORD 2003 on C#NET2008 Window Application.
I am trying to export Customer Invoice Transactions to NonTemplate WORD 2003 Document and it's not working
using System;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.IO;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.Office;
using Microsoft.Office.Interop.Word;
Error messages generated:
Error 1 The type name 'Application' does not exist in the type 'Microsoft.Office.Interop.Word.Words'
Error 2 The type name 'Document' does not exist in the type 'Microsoft.Office.Interop.Word.Words'
Error 3 The type name 'Table' does not exist in the type 'Microsoft.Office.Interop.Word.Words'
Error 4 The type name 'Range' does not exist in the type 'Microsoft.Office.Interop.Word.Words'
Error 5 The type or namespace name 'Word' could not be found (are you missing a using directive or an assembly reference?)
namespace CSharpNet2008UseWORD2003
{
public partial class FrmWORDReport : Form
{
//---declare and instantiate WORD Objects
private Words.Application objWord;
private Words.Document objDoc;
private Words.Table objTable;
private Words.Range objTableRange;
}
}
I have tried using these coding and it's not working either:
private Word.Application objWord;
private Word.Document objDoc;
private Word.Table objTable;
private Word.Range objTableRange;
Reply
Answers (
5
)
Handle null on checking DB
C# modify config file