473,656 Members | 2,997 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Applicatio nClass oWordApp = new Word.Applicatio nClass();
But my application give me error :
The type or namespace name 'ApplicationCla ss' 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 7344
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.Applicatio nClass oWordApp = new Word.Applicatio nClass();

And not:

ApplicationClas s oWordApp = new ApplicationClas s();
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"selen" <sk*****@yahoo. com> wrote in message
news:uE******** ******@TK2MSFTN GP11.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.Applicatio nClass oWordApp = new Word.Applicatio nClass();
But my application give me error :
The type or namespace name 'ApplicationCla ss' 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'

ApplicationClas s oWordApp = new ApplicationClas s();

Document oWordDoc = oWordApp.Docume nts.Add(ref missing,

ref missing,ref missing, ref missing);

oWordDoc.Activa te();

oWordApp.Select ion.TypeText("T his is the text");

oWordApp.Select ion.TypeParagra ph();

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

oWordApp.Applic ation.Quit(ref missing, ref missing, ref missing);

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om>, iletide
þunu yazdý news:OR******** ******@TK2MSFTN GP09.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.Applicatio nClass oWordApp = new Word.Applicatio nClass();

And not:

ApplicationClas s oWordApp = new ApplicationClas s();
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"selen" <sk*****@yahoo. com> wrote in message
news:uE******** ******@TK2MSFTN GP11.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.Applicatio nClass oWordApp = new Word.Applicatio nClass();
But my application give me error :
The type or namespace name 'ApplicationCla ss' 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'

ApplicationClas s oWordApp = new ApplicationClas s();

Document oWordDoc = oWordApp.Docume nts.Add(ref missing,
ref missing,ref missing, ref missing);
oWordDoc.Activa te();
oWordApp.Select ion.TypeText("T his is the text");
oWordApp.Select ion.TypeParagra ph();
oWordDoc.SaveAs ("c:\\myfile.do c");
oWordApp.Applic ation.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.co m>
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
2137
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. However, when they click the links the documents are of cause loaded in the web browser MS Explorer and not opened in MS Word, which is annoying.
0
1539
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 3. After opening a document on that template, I put "2" in all the fields for test Problem is,
4
2397
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" events described and coded for in the examples mdb file.. However - some other important events I cannot get to work - some are: DocumentBeforeClose DocumentBeforePrint DocumentBeforeSave
6
2676
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 were using without issue previous to the switch: 'Start Word and create a new doc from the template Set objWord = CreateObject("Word.Basic") objWord.AppMaximize "Microsoft Word", 1 objWord.FileNew Template:=StrTemplPath & "letter.dot"
8
3172
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 = "C:\\test.doc"; object readOnly = false;
6
4077
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 ? - How do I read the value of a cell within an Excel document ? I tried using a Word-OLB file (object library) that I set a reference to but can't find the right methods I need in order to execute the above.
4
3244
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 little documentation I've been able to find focuses on using only one office app at a time. Thanks for your help
5
5328
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 of it, but I'm having trouble with two pieces: ListGalleries - I can't find any way to make VB.Net understand this. When I do a mouseover, the error message it gives is, "Interface 'Word.ListGalleries' cannot be indexed because it has no...
4
1984
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 pasted a simple routine within the 'click' sub-routine and I'm simple having a problem with resolving the statement 'Dim objWord As New Word.Application' where it is complaining about 'Word.Application' is not defined.
0
8380
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8497
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8598
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7310
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2721
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1928
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1598
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.