473,804 Members | 3,572 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Display a word document in a Windows program without Word

I need to write a windows program in C# that will display a word document on
the screen without having Word loaded on the machine.

How can I do this?

TIA - J.
Oct 14 '08 #1
3 4560
On Tue, 14 Oct 2008 13:52:59 -0400
"Mufasa" <jb@nowhere.com wrote:
I need to write a windows program in C# that will display a word
document on the screen without having Word loaded on the machine.

How can I do this?
If you do not have Word installed on the machine, and the program must
be one of your own creation, then you'll have to read the DOC format
and render it just like MS Word or MS Word Viewer does. There is open
source software that you can study (in other languages) to see how it
is done; you can even look at the source code to OpenOffice.org, which,
IIRC, is done in C++.

Would not the free Word Viewer do what you need, though?

http://www.microsoft.com/downloads/d...displaylang=en

--- Mike

--
My sigfile ran away and is on hiatus.

Oct 14 '08 #2
I will be calling this from a program and my understanding is that when you
use the viewer it automatically opens the document in another window. I want
to be able to have it as part of the window I already have open.

J.

"Michael B. Trausch" <mi**@trausch.u swrote in message
news:2008101414 2835.5755b22e@z est...
On Tue, 14 Oct 2008 13:52:59 -0400
"Mufasa" <jb@nowhere.com wrote:
>I need to write a windows program in C# that will display a word
document on the screen without having Word loaded on the machine.

How can I do this?

If you do not have Word installed on the machine, and the program must
be one of your own creation, then you'll have to read the DOC format
and render it just like MS Word or MS Word Viewer does. There is open
source software that you can study (in other languages) to see how it
is done; you can even look at the source code to OpenOffice.org, which,
IIRC, is done in C++.

Would not the free Word Viewer do what you need, though?

http://www.microsoft.com/downloads/d...displaylang=en

--- Mike

--
My sigfile ran away and is on hiatus.

Oct 17 '08 #3
You will need to use a third party component such as Aspose ,
http://www.aspose.com/, if you want it embeded in your form.
"Mufasa" <jb@nowhere.com wrote in message
news:eE******** ******@TK2MSFTN GP02.phx.gbl...
>I will be calling this from a program and my understanding is that when you
use the viewer it automatically opens the document in another window. I
want to be able to have it as part of the window I already have open.

J.

"Michael B. Trausch" <mi**@trausch.u swrote in message
news:2008101414 2835.5755b22e@z est...
>On Tue, 14 Oct 2008 13:52:59 -0400
"Mufasa" <jb@nowhere.com wrote:
>>I need to write a windows program in C# that will display a word
document on the screen without having Word loaded on the machine.

How can I do this?

If you do not have Word installed on the machine, and the program must
be one of your own creation, then you'll have to read the DOC format
and render it just like MS Word or MS Word Viewer does. There is open
source software that you can study (in other languages) to see how it
is done; you can even look at the source code to OpenOffice.org, which,
IIRC, is done in C++.

Would not the free Word Viewer do what you need, though?

http://www.microsoft.com/downloads/d...displaylang=en

--- Mike

--
My sigfile ran away and is on hiatus.


Oct 17 '08 #4

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

Similar topics

7
3888
by: Zeke | last post by:
I'm using the following code to create word document but the problem is if you go to task manager you'll see a WINWORD.EXE process is running but not the application, here is the code: Word.Document aDoc= WordApp.Documents.Add(ref fileName, ref newTemplate, ref docType, ref isVisible); WordApp.Visible = true; aDoc.Activate(); WordApp.Selection.TypeText("Hello");
7
6253
by: Dave | last post by:
Apologies for the newbie question. I have created a vb.net program for my company that is designed to work with Word Templates (about forty of them that we commonly use) that are selected by the user and populated (with info from an Access database) at run-time, then saved as Word documents. The program I have coded works fine -- it does what I need it to do. But it has two problems: (1) it runs very slowly, and (2) it does not seem to...
1
2588
by: electrixnow | last post by:
I wrote a program in VC++ that generates a text file report. I would like to get this report data into a word document that my company uses. I could use bookmarks for reference in the document. Is there some boiler plate code for C++ or VC++ that I could use to edit and add my data to the bookmark locations in the MS Word doc file? After I have updated the MS Word file I need to print it to a network printer. Is there a easy way of...
1
2060
by: electrixnow | last post by:
I wrote a program in VC++ that generates a text file report. I would like to get this report data into a word document that my company uses. I could use bookmarks for reference in the document. Is there some boiler plate code for C++ or VC++ that I could use to edit and add my data to the bookmark locations in the MS Word doc file? After I have updated the MS Word file I need to print it to a network printer. Is there a easy way of...
5
4704
by: hayworth | last post by:
How do I get the color depth of the screen/display adapter with vb.net 2003? Background: We're having transparency problems (long side story and known Windows "bug") that requires our systems to have the Color Depth or "Color Quality" (bits per pixel) of the display adapter (screen) to be 16 bits (Called "Medium (16 bit)" in the Display Properties Control Panel) in order for it to work.
1
1920
by: live | last post by:
Hi, when i try to open document word for reading and writing with C#, the program stop on this line And the program give me this error : 'DefaultDomain' : chargé
0
3233
by: Niyazi | last post by:
Hi, I created application that store the data in SQL SERVER that reside on network. The client also use this application to access the resources provided with application. But is the client want to register new customer or companies they will enter the information in Windows Form and the program automaticaly creates the WORD document under specific folder under application path. Once the empty word file created than ask user if they want...
12
3460
by: Steve | last post by:
I've been building an application that will merge fields in a text file with a word template, save the resulting word file out to the user's hard drive, and then email the file as an attachment. The problem I'm having is that I can't delete the word file I saved at the end of the process due to the file being locked by the email process. It appears to take longer than the code takes to complete due to virus checking software that...
2
4884
by: Derek Hart | last post by:
I am using late bound Microsoft Word integration with a vb.net winforms application. If I run code such as the following: Dim objWord As Object Dim objWrdDoc As Object Dim count As Integer Dim filename As String filename = "c:\temp\mergedata\1.doc" objWord = CreateObject("Word.Application") For count = 1 To 10000
0
9704
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...
0
10558
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10302
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
10069
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
9130
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
7608
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
6844
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5503
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
4277
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

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.