msword

Reading/Writing MS Word files in Python

Is it possible to read and write Word (2003 and 2007) files in Python without using a COM object? I know that I can: f = open('c:\file.doc', "w") f.write(text) f.close() but Word will read it as an HTML file not a native .doc file. ...

Reading/Writing a MS Word file in PHP

Is it possible to read and write Word (2003 and 2007) files in PHP without using a COM object? I know that I can: $file = fopen('c:\file.doc', 'w+'); fwrite($file, $text); fclose(); but Word will read it as an HTML file not a native .doc file. ...

Why does Word freeze when I'm debugging?

Whenever I'm at a break point in a certain C#.NET application in Visual Studio 2008 and I fire up Microsoft Word 2007, word will fail to open until I restart the C# application. I have a few theories about why, but does anyone know for sure? ...

Converting a Word document into usable HTML in PHP

Hi, I have a set of Word documents which I want to publish using a PHP tool I've written. I copy and paste the Word documents into a text box and then save them into MySQL using the PHP program. The problem I Have arises from all the non-standard characters that Word documents have, like curly quotes and ellipses ("..."). What I do at t...

How do I open a file in C# and change its properties?

I need to open a Microsoft Word 2003 file and change its file properties. Such as changing the Subject in the Summary Tab. ...

How do I print a Word document in Java without opening it?

I have a J2EE based web application, in which on clicking a button I need to create a word file from Java. I want to be able to sent the printing command to this file, so that the file is being printed without the user having to open the document and do it manually. Could anyone please tell me if this is possible and if so how to procee...

What's a good Java API for creating Word documents?

I have a new app I'll be working on where I have to generate a Word document that contains tables, graphs, a table of contents and text. What's a good API to use for this? How sure are you that it supports graphs, ToCs, and tables? What are some hidden gotcha's in using them? Some clarifications: I can't output a PDF, they want a W...

VBA for MS word

There are a lot of free sources to learn about the object model of MSExcel but I failed to find any comprehensive source for a similar source for MS word. Can You suggest a free and comprehensive source for the same? ...

A good Code snippet tool or plugin for Word documents?

Does anyone know of a good tool or plugin that enables Microsoft Word or OpenOffice Writer to add code snippets to a document in a clean manner? I'm not sure if such a plug-in even exists, so redirecting me to any other tool that can help me would be appreciated. ...

How to load MS Word document in C# (.NET)?

Hi, How do I load MS Word document (.doc and .docx) to memory (variable) without doing this?: wordApp.Documents.Open I don't want to open MS Word, I just want that text inside. You gave me answer for DOCX, but what about DOC? I want free and high performance solution - not to open 12.000 instances of Word to process all of them. :(...

How can I access the progress bar in an Office application's status bar.

I build VBA applications for both Word and Excel, is there any way to access the progress bar that sometimes appears in the Office status bar. ...

How can I build Word fields with VBA

Apart from just inserting and parsing text into a blank Word field, is there any way to programatically build user-defined fields and field codes into my own templates with VBA? Furthermore, is there a way to make these fields show up in the list of available fields? ...

How can I display Word documents in a textarea using PHP?

I was trying to test code using com class to display Word files but I cannot seem to get the answer and still searching. I get errors and sometimes, programs do not display anything at all. Please give me some ideas. I'm working with PHP 4. ...

Literate programming

Literate programming is a way of developing software where documentation comes first, then the coding. One writes the documentation of a code snippet, and then writes the implementation of the snippet. The visual appearance of the software source code would be a plain document like word, with code paragraphs in it. I am trying to conve...

Word macro error messages

One of our clients has decided they need their document template macros changed and I am ~lucky~ enough to be given the job. The one thing I can't find out how to do is to customize error messages. For example an error message they get in a document is "Error! No table of figures entries found" I would like to change this to display so...

What are the benefits of MS Word content controls ?

Office 2007 brings a new goodie called as 'content controls'. I need to evaluate this to see if this serves as a solution for a problem under research. Due to paucity of time and my general disdain for Office-interop-pains, can someone summarize the benefits? Is it possible to define custom content controls? where do all the word pro...

How come you can create an interface instance in Office Interop?

I've seen this quite a few times while using Office Interop classes this.CustomXMLParts.Add(MyResources.Data, new Office.CustomXMLSchemaCollection()); If I hover over the CustomXMLSchemaCollection class, it shows up as an interface. Then how come I can do a new on it ? What gives? BTW this code compiles and works. ...

Convert Word doc to HTML programmatically in Java

Hi, I need to convert a Word document into HTML file(s) in Java. The function will take input an word document and the output will be html file(s) based on the number of pages the word document has i.e. if the word document has 3 pages then there will be 3 html files generated having the required page break. I searched for open source/...

VBA: How do I change highlighted text to a different color in MS Word?

I have some simple .doc files I made in Word 2007 where I changed the text color and used highlights to compare some similar texts. What I'd like to do is change any instances of green text or gray highlighting to different respective colors for each. I'm sure there is a simple way to do this with VBA but any other sort of answers are a...

How to change Word.Range text without losing format

Hi, Anyone knows how can I change the text of a Word.Range object but still keeping it's format? For example if I have "this text" and I change it to "that txt", txt will still be in bold. I'm looking for a way to change the whole text of the range, not just a single word, as I'm getting the new text from an independent API, I can assu...