msword

How can a Word document be created in C#?

I have a project where I would like to generate a report export in MS Word format. The report will include images/graphs, tables, and text. What is the best way to do this? Third party tools? What are your experiences? ...

Office VSTO Word 2003 project keeps trying to autoconvert to 2007

I am working on a Office Word add-in for Word 2003. When I reopen the project, the VS2008 auto covert dialog box opens and tries to convert it to the Word 2007 format. How can I reopen this file and keep it in the Word 2003 format? ...

Cleaning up RTF text

I'd like to take some RTF input and clean it to remove all RTF formatting except \ul \b \i to paste it into Word with minor format information. The command used to paste into Word will be something like: oWord.ActiveDocument.ActiveWindow.Selection.PasteAndFormat(0) (with some RTF text already in the Clipboard) {\rtf1\ansi\deff0{\fonttb...

Word Automation: Write RTF text without going through clipboard

I am trying to replace the current selection in Word (2003/2007) by some RTF string stored in a variable. Here is the current code: Clipboard.SetText(strRTFString, TextDataFormat.Rtf) oWord.ActiveDocument.ActiveWindow.Selection.PasteAndFormat(0) Is there any way to do the same thing without going through the clipboard. Or is there an...

Best way to export html to Word without having MS Word installed?

Is there a way to export a simple html page to Word (.doc format, not .docx) without having Microsoft Word installed? ...

Version Control for word documents

How would people recommend doing version control for word documents? Is the in build control up to the job or is it better to rely on dedicated version control systems, and if so, which ones? ...

Best way to extract text from a Word doc without using COM/automation?

Is there a reasonable way to extract plain text from a Word file that doesn't depend on COM automation? (This is a a feature for a web app deployed on a non-Windows platform - that's non-negotiable in this case.) Antiword seems like it might be a reasonable option, but it seems like it might be abandoned. A Python solution would be id...

How Do I detect Text and Cursor position changes in Word using VSTO

I want to write a word addin that does some computations and updates some ui whenever the user types something or moves the current insertion point. From looking at the MSDN docs, I don't see any obvious way such as an TextTyped event on the document or application objects. Does anyone know if this is possible without polling the docume...

How do I locate a Word application window?

I have a VB.net test application that clicks a link that opens the Microsoft Word application window and displays the document. How do I locate the Word application window so that I can grab some text from it? ...

What is the best free way to clean up Word HTML?

Please provide the single best option you are aware of. ...

Need a wiki where I can export to Word

I'm looking for a wiki that I can use to track requirements for a project, but we would like to be able to export the wiki (with formatting) to Microsoft Word. Does anyone know of a wiki that does this? ...

MS Word: How do I create a shortcut or toolbar button for the "Paste Special..Unformatted Text" option?

I have been playing with this for a while, but the closest I have gotten is a button that opens the "Paste Special" dialog box and requires another couple of mouse clicks to paste the contents of the clipboard as unformatted text. So often I am doing a copy-paste from a web site into a document where I don't want the additional baggage...

How do I export styles from a Microsoft Word 2003 .dot file?

I have an old .dot file with a few dozen styles in it. I need to place them into another .dot file that I received. Is there a better way to get them in there than manually recreating each style? ...

Best Library for Dynamic PDF or Word Doc Generation?

Our ASP.NET application must be able to export web content to PDF and Word documents. In the past, we've used Aspose's libraries to accomplish this, but we've found them to be a little too low-level in terms of document construction. e.g. We've found ourselves needing to write point-based functions using shape primitives to create bulle...

SharePoint custom content feature with Word Quick Parts and Document Information Panel

I am creating a custom content type feature for MOSS that will also include a Word 2007 document as the document template. The same Word document will also have a Document Information Panel (DIP) and Quick Parts for all the fields in the content type. The problem is that when my feature is deployed the Word document's Quick Parts no lon...

How to compare two word documents?

Businesses Analyst from my team keeps sending us the updated Requirements documents often and I end up hunting the recent changes by comparing the old version. Is their a good way of comparing the Word documents? Note: We have the track changes option ON, but now the documents looks like a blood bath, complicating it much more :( ...

Can I merge two Microsoft Word documents reliably with Subversion?

We have concurrent edits happening on Word documents and I want to make sure that Subversion can handle merging .doc files. Do you know if Subversion handles merges of Word documents well? ...

How to Create PCL file from MS word

How to create new PCL file similar to existing MS doc. I have Ms doc tamplate and replacing it with actual data. I need to achieve same for PCL format (Create PCL file as tamplate and replacing it with actual value from database and send it to fax). ...

How to verify existence of a table with a given ID in a word doc in C# VSTO 3

I want to check for the existence of a table with a given ID in a word document in C# (VS 2008) Visual Studio Tools for Office (version 3). Obviously I can iterate through the document's Tables collection and check every ID, but this seems inefficient; the document will end up having a few dozen tables after I'm done with it, and while ...

Run macro automatically OnSave in Word

I have a macro which refreshes all fields in a document (the equivalent of doing an F9 on the fields). I'd like to fire this macro automatically when the user saves the document. Under options I can select "update fields when document is printed", but that's not what I want. In the VBA editor I only seem to find events for the Document_...