HI Guys
How to open a word file and HTML file (Without tags) into
richtextbox control.file is opening by this code but it is opening in
plaintext format but i want to open in word format
IDataObject Data1;
object nullobj,file;
WordApp=new Word.Applicatio nClass();
nullobj=Missing .Value;
file =strFileName1;
WordDoc = WordApp.Documen ts.Open(ref file, ref nullobj, ref
nullobj, ref nullobj,ref nullobj, ref nullobj, ref nullobj, ref
nullobj,ref nullobj, ref nullobj, ref nullobj, ref nullobj,ref nullobj,
ref nullobj, ref nullobj,ref nullobj);
WordDoc.ActiveW indow.Selection .WholeStory();
WordDoc.ActiveW indow.Selection .Copy();
Data1= Clipboard.GetDa taObject();
str= Data1.GetData(D ataFormats.Stri ngFormat).ToStr ing();
richTextBox2.Te xt = str;
Console.WriteLi ne(str);
WordDoc.Close(r ef nullobj, ref nullobj, ref nullobj);
pla somebody help me.
Twinkle 2 17187
"Twinkle" wrote:
How to open a word file and HTML file (Without tags) into
richtextbox control.file is opening by this code but it is opening in
plaintext format but i want to open in word format
I believe you need to make changes to the following lines in your code:
str= Data1.GetData(D ataFormats.Rtf) .ToString();
richTextBox2.Rt f = str;
--
Timm Martin
Mini-Tools
..NET Components and Windows Software http://www.mini-tools.com
Hi there
Thank you lot for help me
Twinkle
Mini-Tools Timm wrote:
"Twinkle" wrote:
How to open a word file and HTML file (Without tags) into
richtextbox control.file is opening by this code but it is opening in
plaintext format but i want to open in word format
I believe you need to make changes to the following lines in your code:
str= Data1.GetData(D ataFormats.Rtf) .ToString();
richTextBox2.Rt f = str;
--
Timm Martin
Mini-Tools
.NET Components and Windows Software http://www.mini-tools.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Dominic |
last post by:
Hi guys,
In .NET, how can I convert a HTML file to TIFF efficiently?
One possible way is that I can first use word automatation to load the
HTML up and then print it to TIFF. Is that right? However, even if it
is technically feasible, it can take long time to do the conversion,
especially the HTML is complicated.
Is there any other more efficient way? Thanks!
|
by: alejandro lapeyre |
last post by:
How can I load / parse an HTML file with .NET?
Thanks!
Best regards,
Alejandro Lapeyre
|
by: Amit D.Shinde |
last post by:
Can Microsoft Word Document(.Doc) be loaded in Rich Text Box.
Or is there any other method to get preview of Microsoft Word Document in VB.NET
Please Help me
|
by: Jay Kim |
last post by:
Hi,
We're implementing a Windows application using Visual
Basic .NET.
One of the key features we need to implement is that we
should be able to get the accurate byte offset of user
selected text in the file.
We've been trying to use the RichTextBox control to load
|
by: ksskumar |
last post by:
Hi Friends,
I am creating a application using C#. In that application I am using
RichTextBox (System.Windows.Forms.RichTextBox).
My query is how to create a file link in Rich text box. Means, I want
to embed file in Richtextbox. If the user click / doubleclick /
Ctrl+click the link, that file should open. It is like hyperlink in
HTML.
| |
by: Larry Cheung |
last post by:
Hi,
Is ther anyway I can present a html file on a win form? I have tried
richtextbox. However, it can only accept text or richtext file format.
I would like to use this feature to, for example, present a html email in a
form, may allow user to some editing as well.
Any help is higly appreciated!
|
by: sss024 |
last post by:
Word document viewing in RichTextBox control
|
by: thomasp |
last post by:
Using VB2005 I am trying to display a .rft file in a richtextbox control.
The file contains an table and some other text. The file opens without a
problem in MS Word, but when I display it in the richtextbox control, the
text in the table is not in the correct columns. The text is shifted to the
right and extends outside the table.
Any Ideas
Also, can the PrintPreview control be used to view the .rtf file? I have
several reports...
|
by: veer |
last post by:
Hi!
i am making a program in which i want to search a particular word in html file
and if word found save it into excel file with html file name
e.g
i want to search a string "visual" in a.html file and if found then this string is transfered into excel file with html file name
please give some idea
thanks in advance
varinder
|
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...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |