473,748 Members | 2,410 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Open or preview a word document in a c# MDI windows form

Hi, there,

1. I would like to open a word document in a MDI environment. Every time, a new window outside my MDI poped out and show the word document. Is there a method I can use to specify the showing window? And how to?
2. Is there a way to preview the word document, other than load it fully?
3. How to extract all the characters in Unicode from this word document?

Thanks lot in advance!

Gary
Nov 16 '05 #1
1 13948
Gary wrote:
1. I would like to open a word document in a MDI environment.
Every time, a new window outside my MDI poped out and show the word document.
Is there a method I can use to specify the showing window? And how to?
Hi Gary,

you can host the Word-document on a Windows.Forms.F orm by using IE:

How To Use the WebBrowser Control to Open Office Documents with Visual
C# .NET
http://support.microsoft.com/?id=304662

or you can take an ActiveX-Control that hosts Office-documents and use
it through COM/interop.

SAMPLE: Visual C++ ActiveX Control for Hosting Office Documents in
Visual Basic or HTML
http://support.microsoft.com/?id=311765
2. Is there a way to preview the word document, other than load it fully?
The pre-built preview file is located in the compound document structure
of the word document which can be read by using the dsofile.dll which is
a COM-dll but it works through COM/interop:
[DSOleFile.Docum entProperties.T humbnail]

http://support.microsoft.com/?id=224351
3. How to extract all the characters in Unicode from this word document?


Perhaps by simply temporarily saving the Word-document in text-only format

doc.SaveAs("fil eName.txt, WdSaveFormat.wd FormatUnicodeTe xt, ...) and
reading it again by using StreamReader?

Cheers

Arne Janning
Nov 16 '05 #2

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

Similar topics

1
7973
by: Eager-Learner | last post by:
Through window.open or window.showmodaldialog, I want to open a word or excel document in Print Preview mode. Bcos I don't want the user to make any changes or save it but the user can ONLY VIEW OR take a print out. Can anyone help me out ? Thanks in advance for any help / guideline
3
5813
by: Andy Davis | last post by:
How do i or can I open a word document directly from Access? I would like to be able for the user to click a button on my form to open a word document and then also run a macro in Word. Thanks in advance
2
6844
by: VP | last post by:
Hi, I am trying to open an existing word document, the execution happens with no error but Word does not come up and my document does not open. This is the code I am using.. Microsoft.Office.Interop.Word.ApplicationClass WordApp = new Microsoft.Office.Interop.Word.ApplicationClass();
7
3887
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");
6
2917
by: Jason Huang | last post by:
Hi, Using C# web form in ASP.Net, how to open a MS Word application? Thanks for help. Jason
5
2640
by: Dave A | last post by:
I am writing an ASP.NET tool that will allow the client to create their own online froms. ie the client can add tect boxes, text, drop downs,etc with absolutely no technical skill what so ever. The form can then be deployed to their intranet. The form designer is somewhat WYSIWYG but it contains a heap of 'edit', 'delete' and reordering buttons that are not seen when the form is acutally being used. I would love to have a preview...
1
2963
by: Angelos | last post by:
Hello there, I am very new to Javascript and before I explain what I want I'll tell you in a few words that I am trying to make a button on a WYSIWYG text editor (RichArea) that previews on a template the content of the editor and not in just an empty page. I can't get around the folowing: I have a page with a form and a text area. In the textarea I write html code or any text.
0
3230
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...
6
2657
by: Bob Alston | last post by:
Looking for someone with experience building apps with multiple instances of forms open. I am building an app for a nonprofit organizations case workers. They provide services to the elderly. so far I have built a traditional app, switchboard, forms, etc. Part of this app is to automate the forms they previously prepared manually. After the app was built and works just fine, I find out there are several case managers using MS word...
0
8991
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
9376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9326
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
9249
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
6076
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
4877
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3315
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
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
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.