473,413 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

word reference

Hello
I add Microsoft Word 10.0 Object Library from reference com.
and I am writing my code to create an instance of a Word application.My code
is
Word.ApplicationClass oWordApp = new Word.ApplicationClass();
But my application give me error :
The type or namespace name 'ApplicationClass' does not exist in the class or
namespace 'kalite.Word' (are you missing an assembly reference?)

Where I am wrong.

Thanks..
Nov 15 '05 #1
3 7330
Selen,

Are you sure that you have set a reference in the project you are using?
Either that, or are you sure that the line is:

Word.ApplicationClass oWordApp = new Word.ApplicationClass();

And not:

ApplicationClass oWordApp = new ApplicationClass();
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"selen" <sk*****@yahoo.com> wrote in message
news:uE**************@TK2MSFTNGP11.phx.gbl...
Hello
I add Microsoft Word 10.0 Object Library from reference com.
and I am writing my code to create an instance of a Word application.My code is
Word.ApplicationClass oWordApp = new Word.ApplicationClass();
But my application give me error :
The type or namespace name 'ApplicationClass' does not exist in the class or namespace 'kalite.Word' (are you missing an assembly reference?)

Where I am wrong.

Thanks..

Nov 15 '05 #2
Yes I am sure. I wrote using Word;
and I write below code but this give me error that missing The name
'missing' does not exist in the class or namespace 'kalite.Word'

ApplicationClass oWordApp = new ApplicationClass();

Document oWordDoc = oWordApp.Documents.Add(ref missing,

ref missing,ref missing, ref missing);

oWordDoc.Activate();

oWordApp.Selection.TypeText("This is the text");

oWordApp.Selection.TypeParagraph();

oWordDoc.SaveAs("c:\\myfile.doc");

oWordApp.Application.Quit(ref missing, ref missing, ref missing);

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com>, iletide
þunu yazdý news:OR**************@TK2MSFTNGP09.phx.gbl...
Selen,

Are you sure that you have set a reference in the project you are using? Either that, or are you sure that the line is:

Word.ApplicationClass oWordApp = new Word.ApplicationClass();

And not:

ApplicationClass oWordApp = new ApplicationClass();
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"selen" <sk*****@yahoo.com> wrote in message
news:uE**************@TK2MSFTNGP11.phx.gbl...
Hello
I add Microsoft Word 10.0 Object Library from reference com.
and I am writing my code to create an instance of a Word application.My code
is
Word.ApplicationClass oWordApp = new Word.ApplicationClass();
But my application give me error :
The type or namespace name 'ApplicationClass' does not exist in the

class or
namespace 'kalite.Word' (are you missing an assembly reference?)

Where I am wrong.

Thanks..


Nov 15 '05 #3
selen <sk*****@yahoo.com> wrote:
Yes I am sure. I wrote using Word;
and I write below code but this give me error that missing The name
'missing' does not exist in the class or namespace 'kalite.Word'

ApplicationClass oWordApp = new ApplicationClass();

Document oWordDoc = oWordApp.Documents.Add(ref missing,
ref missing,ref missing, ref missing);
oWordDoc.Activate();
oWordApp.Selection.TypeText("This is the text");
oWordApp.Selection.TypeParagraph();
oWordDoc.SaveAs("c:\\myfile.doc");
oWordApp.Application.Quit(ref missing, ref missing, ref missing);


Well you certainly haven't given any indication of where the missing
variable *is* declared...

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Erik Ronne | last post by:
Hello Gurus I have an intranet web page with links to all kinds of Microsoft Word document that we use at my work, so my co-works can go to the web page when they need a special document....
0
by: Sudipto Sen | last post by:
================== Problem Description ================== Following code is for 1. Load a Word Template called CustomerInfo1.dot 2. CustomerInfo1.dot is a normal Word Template with Form fields...
4
by: astro | last post by:
I've been looking at the event sinking example in Litwin et. al. "Access 97 Developer's Handbook" and I am able to event sink the 2 events listed - those being the "_quit" and "_documentchange"...
6
by: Ryan Muller | last post by:
My company just upgraded from Access 97 to Access 2003 today and we are having some issues in a database that generates a Word document from information selected in a form. Here is the code we...
8
by: sudha | last post by:
Hi, To open a word doc from c#, i use the following code : Word.ApplicationClass WordApp = new Word.ApplicationClass (); // give any file name of your choice. object fileName =...
6
by: Chris | last post by:
Hi, - How can I open an existing word document from a C#-client and manipulate that document from within the C#-client ? - How can I open an excel document that is embedded in a word-document...
4
by: Lisa | last post by:
Hi - I'm able to open excel workbooks and word documents, but I can't seem to copy excel charts, named ranges, etc. to a word document. Anyone know of good reference material in this area? What...
5
by: Mason | last post by:
I'm having some problems converting VBA for Word 2000 to code that VB.Net understands. I recorded a macro in Word to add numbering (a. b. c.) to my paragraphs. I managed to translate quite a bit...
4
by: =?Utf-8?B?QXJ0?= | last post by:
Hello, I saw this posting and it is the closest place to ask this question. I am simply trying to create a Word document from a VB application I am wrting with Visual Studio 2005. I cut a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.