word

asp.net page is not responding while converting word document to html

i m using microsoft.office 11.0 object library and microsoft word 11.0 object library. The code makes problem only when we host the website locally or in server other wise it function well. i think below code makes problem. Ant one pls help me. i m in an urgent. Microsoft.Office.Interop.Word.Document doc = wordApplication.Documents.Open...

Programatically get pages count in Microsoft Word documents on linux

I need to get pages count from word documents. I've tested many libraries and scripts (apache poi, perl scripts, some application for linux and some more) and the only working solution was to install Microsoft Office with Wine and access OLE with perl. I've managed to do it but it seems I can't use it on server due to licensing problems....

VSTO Word 2007: How can a control be programmatically moved above/below the range of an existing control?

I am developing a Word 2007 document template with VSTO. The document has several RichTextContentControls and there is a visible ActionsPane with a treeview control where the nodes of the treeview are the names of the RichTextContentControls. Users can re-order nodes by dragging/dropping nodes to new locations in the treeview. As no...

Word - Insert data from registry into predefined bookmarks

Hi! I've got data in the registry under Current User which I want to add into predefined bookmarks in Word documents. Now, the thing is, I want the exact same macro in every single Word document and have the macro skip the step if it can't find the predefined bookmark. I've got this code already where I need to predefine an array of th...

Get PID from Word ApplicationClass?

using Microsoft.Office.Interop.Word; ApplicationClass _application = new ApplicationClass(); Can I get the PID from the Winword.exe process that was lunched by the _application? I need the PID because with corrupted files, I just cant quit the ApplicationClass, even using this code: _application.Quit(ref saveFile, ref missing, ref m...

Knowing Page Size of HTML Content- Word Document

I have generated HTML Content and I am writing it to a word File. I want to Know How many Pages it will take when Written to the Word Document. ...

Can I get an English dictionary word list somewhere?

I'm creating this cool answer engine that answers "who" questions. I will share the URL soon. However, I need a list of English words for that, so find "proper nouns". Can I get an English dictionary dump or just a list of all English words, preferably British and American. Any help will be amazingly helpful! ...

Word Automation: Detect if page break is necessary?

Hi, I am working on a project in C# that will produce a Word document using the Word Automation API. I would like to insert page breaks at specific points in the generated document and I am currently doing this successfully with the following code: // Generate page break object pageBreak = WdBreakType.wdPageBreak; wordApp.Selection.In...

Hiding Text in Word (particularly tables)

Hi I've been working on a document that has a number of hidden sections that can be made visible using check boxes (and VBA). Most of this works fine including hiding Tables, Pictures, Formatting and Text using Range.Font.Hidden = True. My problem lies with leaving a table hidden, saving the document and then re-opening the document. ...

How to embed excel in word programmatically?

Are there any way to do so? I prefer to use VB.NET or Java and try to avoid to use VBA. Thanks! ...

What are the limitations for bookmark names in Microsoft Word?

I need to bookmark parts of a document from the name of paragraphs but the name of a paragraph is not always a valid name for a bookmark name. I have not found on Google or MSDN an exhaustive list of limitations for bookmark names. What special characters are forbidden? The only thing I found is that the length must not exceed 40 cha...

Programmatic way to place a website into a new Word file... in Java

Is it possible to programmatically place the contents of a web page into a Word file? To further complicate this, I'd like to do these steps in Java (using JNI if I must). Here are the steps I want to do programmatically, followed by ways that I would do this manually today: Provide a method with a URL (Manually: Open page in Fir...

Creating tables for copy from Word to Excel

So, I needed to take some data done in MS Word tables, and manipulate in excel. I decided to get it from word to excel via a VBA subroutine to "save time". My source word document contained like twentysomething tables. I took my source document's tables, extracted my data and made a new document, with a new table, only needing me to ...

Best match between two strings when the order or number of times a word appears is not important?

What is the best algorithm to match or compute the distance between two strings in C# when the order or number of times a word appears is not important? Best means: Would mostly agree with a human match Elegant Efficient Scalable, so that an input string could be matched to a potentially large collection of other strings Related que...

Embed MS Word as editor (like in Outlook)

In Outlook you can use Word as your editor for emails (not sure what the situation is in Office 2007, but you can in 2003) Is it possible for me to replicate this in my own app? I've seen an article mentioning using the Web Browser component, opening a .doc file and turning on the right toolbars but I'm not sure if this is the right way...

Printing using Word Interop with Print Dialog

Hey All! I'm trying to print a word doc from my C# code. I used the 12.0.0.0 Word Interop and what i'm trying to do is to get a Print Dialogue pop up before the document prints. I'm not 100% sure of the syntax of all of this as I can't get my code to work :( Any ideas? Thanks in advance! ...

Mail Merge (Excel to Word) using C#

Hey all I was wondering if anybody knew how to do a mail merge using an Excel file as a datasource, to fill in fields on a Word template? I wish to use the interop for Word if i could...but am having a few difficulties finding code for this. Does anybody have any syntax for this? Thank you in advance. ...

What is the regular expression for a Spanish word?

Regular expression languages use \B to include A..Z, a..z, 0..9, and _, and \b is defined as a word boundary. How can I write a regular expression that matches all valid Spanish words, including characters such as: á, í, ó, é, ñ, etc.? I'm using .NET. ...

Formatted output in OOffice/Word with python

I am working on a project(in python) that needs formatted, editable output. Since the end-user isn't going to be technically proficient, the output needs to be in a word processor editable format. The formatting is complex(bullet points, paragraphs, bold face, etc), I'm wondering if there is a way to generate such a report using python. ...

Is there a way to modify a Microsoft Word footer using Apache POI?

I need to modify the content of a Word footer using a Java API. The Apache POI project does not seem to support this functionality: WARNING - you shouldn't change the headers or footers, as offsets are not yet updated! My question is twofold: Does anyone know of a way to do this using POI's API? Is there a different java API wh...