How to embed ms word into winform - c#

i need to know the ways of embedding ms word with limited controls in winform . and also i want to insert some headers and footers in to the ms word. Found some articles which depicts only embedding the controls inside the winform . So my question is how to generate a document file and limit the controls of msword inside the winform . Anyone help me.

I don't believe this is possible.
What you could do however would be place a rich text field onto the screen and save the content into a .doc format - which you could make available for download or submission.
EDIT: question referrred to winforms. This can be done use standard rtf in the rich text box.
link to a tutorial on rtf tables - http://www.devx.com/asp/Article/17964/0/page/3

Related

c# pasting contents of word document into winforms control

Is there a way to paste a particular word document's contents into any winforms controls? I need the exact formatting of the word document along with any printscreens it has.
I don't believe there is any Visual Studio native control to achieve what you want to do. The RichText Box will not provide 100% formatting.
In this case you will have to find a 3rd party control.
The following is free and you have the sourcecode but it looks a bit old:
https://www.codeproject.com/articles/3582/word-control-for-net
A quick google search yielded these products.
https://www.devexpress.com/products/net/controls/winforms/rich_editor/
https://marketplace.visualstudio.com/items?itemName=NevronSoftware.RichTextEditorforWinForms-12056

OneNote (.one) format to RichTextBox (RTF) C#

I need help with one problem. I have to take the text from OneNote file in Clipboard or with some other shortcut or with one mouse click and insert it to RichTextBox in Visual Studio.
Only problem is that if I copy the text to RichTexBox, there is a special frame left in RichTexBox Window, so i couldn't work with the text. This frame is a note from OneNote file, because if you want to contribute to OneNote file, you have to insert this note and there is no other possibility how to write a text, am I right?
This problem could be solved by copying to MS Word (the frame disappears) and after that by using of a new copy of the text (from MS Word) and pasting it to RichTextBox in VS. I need to do that somehow in one step.
Could you please give me some tips how to do that? I need to work parse the text (rich text) in C# and convert it.
P.S.: Sorry for my English.
If you want to parse text in .one file you can use Application Interface of Onenote. By using this you can read the onenote page(XML output) and parse as you want. Application Interface 2013.
Page content:
http://pastebin.com/acgaBSe3
Where Page is:

How to search string and highlight the searched strings in the Document

Hai,
We are presently working on C# windows Application using
Janus Controls.
In that we have a search functionality like, if you search any word in search box, all the documents(it's my be Notepad,Ms-word,PDF)
which contains that searched word should be displayed in the
application.
when we Double click on the any document it should open a new window like popup
and show preview like what word you have searched and the searched
word should be highlighted with some color as like in our Microsoft
Word Document.
we can open the particular document using word or Pdf and highlight
the text. But we need to open it in one window and show all the
matched searched text in highlighted.
Please provide the possible Solution or link to work with or any tools to work with this scenario.
Thank you.
For including the documents from the system , you need to first include that document in the project either in the program or you can do it while creating the project . Then you need to open the file and read with the help of StreamReader and search for the particular word .

How to read and write in content control rich text of MS Word in c#?

I have a table in ms word , which contains a content control Rich Text (Which can be added by using developers ribbon) in cells.
I want to read and write text in Rich Text using window c# .
I was trying to read fields by
wd.ActiveDocument.FormFields.Count.ToString()
You can use office interop api s to explore word files.
Look into the following link,
http://msdn.microsoft.com/en-us/library/dd264733.aspx
Very urgent and very little detail
You don't say Forms or WPF
Not going to read and write to MS Word in .NET without a 3rd party control to my knowledge
FlowDocument has rich formatting but is limited to WPF.
RichTextBox can be used to edit a FlowDocument.
FlowDocument

Highlight text in a pdf file embedded in a site using C#

I need to render pdf file in a webbrowser then highlight some words on it.
How can i do it? any sure 3rd party dll that i can use for this?
Thank,
Jepe
I am using "URL Parameters" as in PDF Open Parameters to get to a certain PDF Page or bookmark. There is something for highlighting too, but not searching and highlighting AFAIK. I also do have some issue (see Fragment lost ) using it with the WinForm WebBrowser control, nevertheless I find the approach useful.

Categories

Resources